(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lx = factory());
}(this, (function () { 'use strict';

	var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

	function getDefaultExportFromCjs (x) {
		return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
	}

	function createCommonjsModule(fn, basedir, module) {
		return module = {
			path: basedir,
			exports: {},
			require: function (path, base) {
				return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
			}
		}, fn(module, module.exports), module.exports;
	}

	function commonjsRequire () {
		throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
	}

	var defineProperty = createCommonjsModule(function (module) {
	function _defineProperty(obj, key, value) {
	  if (key in obj) {
	    Object.defineProperty(obj, key, {
	      value: value,
	      enumerable: true,
	      configurable: true,
	      writable: true
	    });
	  } else {
	    obj[key] = value;
	  }

	  return obj;
	}

	module.exports = _defineProperty;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _defineProperty = /*@__PURE__*/getDefaultExportFromCjs(defineProperty);

	var objectSpread2 = createCommonjsModule(function (module) {
	function ownKeys(object, enumerableOnly) {
	  var keys = Object.keys(object);

	  if (Object.getOwnPropertySymbols) {
	    var symbols = Object.getOwnPropertySymbols(object);

	    if (enumerableOnly) {
	      symbols = symbols.filter(function (sym) {
	        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
	      });
	    }

	    keys.push.apply(keys, symbols);
	  }

	  return keys;
	}

	function _objectSpread2(target) {
	  for (var i = 1; i < arguments.length; i++) {
	    var source = arguments[i] != null ? arguments[i] : {};

	    if (i % 2) {
	      ownKeys(Object(source), true).forEach(function (key) {
	        defineProperty(target, key, source[key]);
	      });
	    } else if (Object.getOwnPropertyDescriptors) {
	      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
	    } else {
	      ownKeys(Object(source)).forEach(function (key) {
	        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
	      });
	    }
	  }

	  return target;
	}

	module.exports = _objectSpread2;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _objectSpread = /*@__PURE__*/getDefaultExportFromCjs(objectSpread2);

	var arrayLikeToArray = createCommonjsModule(function (module) {
	function _arrayLikeToArray(arr, len) {
	  if (len == null || len > arr.length) len = arr.length;

	  for (var i = 0, arr2 = new Array(len); i < len; i++) {
	    arr2[i] = arr[i];
	  }

	  return arr2;
	}

	module.exports = _arrayLikeToArray;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var arrayWithoutHoles = createCommonjsModule(function (module) {
	function _arrayWithoutHoles(arr) {
	  if (Array.isArray(arr)) return arrayLikeToArray(arr);
	}

	module.exports = _arrayWithoutHoles;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var iterableToArray = createCommonjsModule(function (module) {
	function _iterableToArray(iter) {
	  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
	}

	module.exports = _iterableToArray;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var unsupportedIterableToArray = createCommonjsModule(function (module) {
	function _unsupportedIterableToArray(o, minLen) {
	  if (!o) return;
	  if (typeof o === "string") return arrayLikeToArray(o, minLen);
	  var n = Object.prototype.toString.call(o).slice(8, -1);
	  if (n === "Object" && o.constructor) n = o.constructor.name;
	  if (n === "Map" || n === "Set") return Array.from(o);
	  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
	}

	module.exports = _unsupportedIterableToArray;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var nonIterableSpread = createCommonjsModule(function (module) {
	function _nonIterableSpread() {
	  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
	}

	module.exports = _nonIterableSpread;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var toConsumableArray = createCommonjsModule(function (module) {
	function _toConsumableArray(arr) {
	  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
	}

	module.exports = _toConsumableArray;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _toConsumableArray = /*@__PURE__*/getDefaultExportFromCjs(toConsumableArray);

	var name = "@lanxin/app-jssdk-v2";
	var version = "0.1.57";
	var description = "lanxin app jssdk v2";
	var author = "lanxin-fe";
	var main = "dist/app-jssdk-v2.js";
	var module = "dist/app-jssdk-v2.esm.js";
	var unpkg = "dist/app-jssdk-v2.umd.js";
	var sideEffects = false;
	var scripts = {
		build: "father-build",
		lint: "npm run lint:js && npm run lint:prettier",
		"lint:js": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src",
		"lint:fix": "npm run lint:js -- --fix",
		"lint:prettier": "check-prettier lint",
		compile: "npx babel src --out-dir lib  --presets=@babel/preset-env",
		gendoc: "npm run compile && node scripts/genDoc.js",
		prettier: "prettier -c --write **/*"
	};
	var license = "ISC";
	var files = [
		"src",
		"dist/*.js"
	];
	var dependencies = {
		"@babel/runtime": "^7.10.5",
		"@lanxin/app-jssdk-edge": "0.0.3",
		events: "^3.1.0",
		lodash: "^4.17.19"
	};
	var devDependencies = {
		"@babel/cli": "^7.15.7",
		"@babel/core": "^7.15.8",
		"@babel/preset-env": "^7.15.8",
		"babel-eslint": "^10.0.1",
		"babel-plugin-lodash": "^3.3.4",
		"check-prettier": "^1.0.3",
		eslint: "^5.7.0",
		"father-build": "^1.18.1",
		"form-data": "^4.0.0",
		fs: "0.0.1-security",
		husky: "^2.3.0",
		json2md: "^1.12.0",
		"lint-staged": "^9.4.2",
		path: "^0.12.7",
		prettier: "^1.19.1",
		"rollup-plugin-node-builtins": "^2.1.2",
		shelljs: "^0.8.4"
	};
	var husky = {
		hooks: {
			"pre-commit": "lint-staged"
		}
	};
	var pkg = {
		name: name,
		version: version,
		description: description,
		author: author,
		main: main,
		module: module,
		unpkg: unpkg,
		sideEffects: sideEffects,
		scripts: scripts,
		license: license,
		files: files,
		dependencies: dependencies,
		devDependencies: devDependencies,
		husky: husky,
		"lint-staged": {
		"**/*.{js,ts,json,css,md}": [
			"npm run prettier",
			"git add"
		],
		"**/*.{js,ts}": [
			"npm run lint:fix",
			"git add"
		]
	}
	};

	var CONFIG_STATE = {
	  UNREADY: 'UNREADY',
	  // 未准备好
	  AUTHORIZING: 'AUTHORIZING',
	  // 授权中
	  READY: 'READY' // 准备就绪

	};
	var CALLBACK_TYPE = {
	  CALLBACK: 'CALLBACK',
	  PROMISE: 'PROMISE'
	};
	var GROUP_CODE = {
	  config: 10000,
	  device: 20000,
	  media: 30000,
	  ui: 40000,
	  biz: 50000,
	  pay: 60000,
	  utils: 90000
	};
	var OS_TYPE = {
	  ANDROID: 'Android',
	  IOS: 'iOS',
	  MAC: 'Mac',
	  WINDOWS: 'Windows',
	  UNKNOWN: 'Unknown'
	};

	/**
	 *  userAgent修改： Lanxin -> 360messenger
	 */
	var USERAGENT_KEYWORD = '(lanxin|es360messenger)';
	var _navigator = navigator,
	    userAgent = _navigator.userAgent;
	var UA = userAgent.toLowerCase(); // let parser = new UAParser;

	var isAndroid = /android/gi.test(UA);
	var isiOS = !!UA.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/i);
	var isiPhone = /iphone/gi.test(UA);
	var isiPad = /ipad/gi.test(UA);
	var isMac = /macintosh/gi.test(UA);
	var isWindows = /windows/gi.test(UA);
	var isLanxinApp = new RegExp(USERAGENT_KEYWORD, 'ig').test(UA);
	var isLanxinMobile = isLanxinApp && (isAndroid || isiOS);
	var isLanxinPc = isLanxinApp && (isMac || isWindows);

	var getOsType = function getOsType() {
	  var os = null;

	  if (isiOS) {
	    os = OS_TYPE.IOS;
	  } else if (isAndroid) {
	    os = OS_TYPE.ANDROID;
	  } else if (isMac) {
	    os = OS_TYPE.MAC;
	  } else if (isWindows) {
	    os = OS_TYPE.WINDOWS;
	  } else {
	    os = OS_TYPE.UNKNOWN;
	  }

	  return os;
	}; // es360messenger/1.0.0-1234

	var platform = {
	  isAndroid: isAndroid,
	  isiOS: isiOS,
	  isiPhone: isiPhone,
	  isiPad: isiPad,
	  isMac: isMac,
	  isWindows: isWindows,
	  isLanxinApp: isLanxinApp,
	  isLanxinMobile: isLanxinMobile,
	  isLanxinPc: isLanxinPc
	};

	var chooseContacts = {
	  name: 'biz.chooseContacts',
	  payload: {
	    title: {
	      type: String,
	      default: '选择人员'
	    },
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    type: {
	      type: Array,
	      default: ['friend', 'staff']
	    },
	    canChooseExternal: Boolean,
	    max: Number,
	    maxTip: String,
	    existentStaffs: Array,
	    existentSectors: Array,
	    requiredStaffs: Array,
	    requiredSectors: Array,
	    selectGroupMembers: Boolean
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: '>6.0.0',
	    mac: '>6.5.0'
	  }
	};

	var chooseDepartments = {
	  name: 'biz.chooseDepartments',
	  payload: {
	    title: {
	      type: String,
	      default: '选择部门'
	    },
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    max: Number,
	    maxTip: String,
	    existentSectors: Array,
	    requiredSectors: Array
	  },
	  type: 'call',
	  version: {
	    ios: undefined,
	    android: undefined,
	    windows: undefined,
	    mac: undefined
	  }
	};

	var chooseContactsAndPhoneContacts = {
	  name: 'biz.chooseContactsAndPhoneContacts',
	  payload: {
	    title: {
	      type: String,
	      default: '选择人员'
	    },
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    max: Number,
	    maxTip: String,
	    existentContacts: Array,
	    existentPhoneContacts: Array
	  },
	  type: 'call',
	  version: {
	    ios: '>6.3.0',
	    android: '>6.3.0',
	    windows: undefined,
	    mac: '>6.6.0'
	  }
	};

	var openContactsCard = {
	  name: 'biz.openContactsCard',
	  payload: {
	    staffId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: '>6.0.0',
	    mac: '>6.6.0'
	  }
	};

	/**
	 * 创建群会话
	 * https://wiki.qianxin-inc.cn/display/lxcommon/biz.createGroupChat
	 */
	var createGroupChat = {
	  name: 'biz.createGroupChat',
	  payload: {
	    name: String,
	    requiredStaffs: Array,
	    requiredSectors: Array
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.7.15',
	    android: '>=7.7.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var openGroupChat = {
	  name: 'biz.openGroupChat',
	  payload: {
	    groupId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.3.0',
	    android: '>6.3.0',
	    windows: '>6.3.0',
	    mac: '>6.6.0'
	  }
	};

	var chooseChat = {
	  name: 'biz.chooseChat',
	  payload: {
	    title: {
	      type: String,
	      default: ''
	    },
	    allowCreate: {
	      type: Boolean,
	      default: true
	    },
	    max: {
	      type: Number,
	      default: 9,
	      validator: function validator(value) {
	        if (value > 0 && value <= 100) {
	          return true;
	        }

	        return false;
	      }
	    },
	    type: {
	      type: Array,
	      default: [1, 2]
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.5.0',
	    android: '>6.5.0',
	    windows: '>6.5.0',
	    mac: '>6.5.0'
	  }
	};

	var getAuthCode = {
	  name: 'biz.getAuthCode',
	  payload: {
	    appId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.0',
	    android: '>6.6.0',
	    windows: '>6.6.110',
	    mac: '>6.6.0'
	  }
	};

	var getVisitorToken = {
	  name: 'biz.getVisitorToken',
	  payload: {},
	  type: 'call'
	};

	var getSectorMembers = {
	  name: 'biz.getSectorMembers',
	  payload: {
	    sectors: {
	      type: Array,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.67',
	    android: '>7.0.67',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var chooseCloudFile = {
	  name: 'biz.chooseCloudFile',
	  payload: {
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    max: {
	      type: Number,
	      default: 9
	    },
	    maxTip: {
	      type: String,
	      default: '当前选择文件数已超出最大限制'
	    },
	    existent: Array,
	    types: Array
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.86',
	    windows: undefined,
	    mac: '>6.6.202'
	  }
	};

	var chooseLocalFile = {
	  name: 'biz.chooseLocalFile',
	  payload: {
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    max: {
	      type: Number,
	      default: 9
	    },
	    maxTip: {
	      type: String,
	      default: '当前选择文件数已超出最大限制'
	    },
	    maxSize: Number,
	    types: Array
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.12.15',
	    android: '>=7.12.15',
	    windows: '>7.0.70',
	    mac: '>7.0.70'
	  }
	};

	var search = {
	  name: 'biz.search',
	  payload: {
	    keyword: {
	      type: String,
	      required: true
	    },
	    pageIndex: {
	      type: Number,
	      default: 0
	    },
	    searchType: {
	      type: Number,
	      required: true
	    },
	    count: {
	      type: Number,
	      required: true
	    },
	    coid: {
	      type: Number,
	      default: 0
	    },
	    ccid: {
	      type: Number,
	      default: 0
	    },
	    ctype: {
	      type: Number,
	      default: 0
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var locateToMessage = {
	  name: 'biz.locateToMessage',
	  payload: {
	    coid: {
	      type: Number,
	      required: true
	    },
	    ccid: {
	      type: Number,
	      required: true
	    },
	    seq: {
	      type: Number,
	      required: true
	    },
	    chatType: {
	      type: Number,
	      required: true
	    },
	    name: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var transformImplIds = {
	  name: 'biz.transformImplIds',
	  payload: {
	    implType: {
	      type: Number,
	      required: true
	    },
	    implIds: {
	      type: Array,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var openChat = {
	  name: 'biz.openChat',
	  payload: {
	    chatId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var otherAppOpen = {
	  name: 'biz.otherAppOpen',
	  payload: {
	    localId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var getSetting = {
	  name: 'biz.getSetting',
	  payload: {
	    type: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var openSpecificView = {
	  name: 'biz.openSpecificView',
	  payload: {
	    type: {
	      type: String,
	      required: true
	    },
	    version: {
	      type: String,
	      default: 'v1'
	    },
	    query: {
	      type: Object,
	      default: {}
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var initWindowData = {
	  name: 'biz.initWindowData',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var sendWindowData = {
	  name: 'biz.sendWindowData',
	  payload: {
	    requestTag: {
	      type: String
	    },
	    isFinish: {
	      type: Boolean,
	      default: false
	    },
	    data: {
	      type: Object
	    },
	    status: {
	      type: Object,
	      default: {
	        code: 0,
	        message: 'ok'
	      }
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var biz = [chooseContacts, chooseDepartments, chooseContactsAndPhoneContacts, openContactsCard, openGroupChat, chooseChat, getAuthCode, getVisitorToken, chooseCloudFile, chooseLocalFile, getSectorMembers, createGroupChat, search, locateToMessage, transformImplIds, openChat, otherAppOpen, getSetting, openSpecificView, initWindowData, sendWindowData];

	var chooseImage = {
	  name: 'media.chooseImage',
	  payload: {
	    count: {
	      type: Number,
	      default: 9
	    },
	    sourceType: {
	      type: Array,
	      default: ['album', 'camera']
	    },
	    sizeType: {
	      type: Array,
	      default: ['original', 'compressed']
	    },
	    // ios: >6.6.85 android: >6.6.88
	    quality: {
	      type: String,
	      default: 'low'
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var previewImage = {
	  name: 'media.previewImage',
	  payload: {
	    current: {
	      type: [Number, String]
	    },
	    urls: {
	      type: Array,
	      required: true
	    },
	    actions: {
	      type: Array
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var compressImage = {
	  name: 'media.compressImage',
	  payload: {
	    filePaths: {
	      type: Array,
	      required: true
	    },
	    ratio: Number
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.12.15',
	    android: '>=7.12.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getImageInfo = {
	  name: 'media.getImageInfo',
	  payload: {
	    src: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.12.15',
	    android: '>=7.12.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var chooseVideo = {
	  name: 'media.chooseVideo',
	  payload: {
	    sourceType: {
	      type: Array,
	      default: ['album', 'camera']
	    },
	    compressed: {
	      type: Boolean,
	      default: true
	    },
	    maxDuration: {
	      type: Number,
	      default: 300
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var previewVideo = {
	  name: 'media.previewVideo',
	  payload: {
	    url: {
	      type: String,
	      required: true
	    },
	    startTime: Number,
	    orientation: String
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var startRecord = {
	  name: 'media.startRecord',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var stopRecord = {
	  name: 'media.stopRecord',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onRecordEnd = {
	  name: 'media.onRecordEnd',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var playVoice = {
	  name: 'media.playVoice',
	  payload: {
	    localId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var pauseVoice = {
	  name: 'media.pauseVoice',
	  payload: {
	    localId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var stopVoice = {
	  name: 'media.stopVoice',
	  payload: {
	    localId: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var onVoicePlay = {
	  name: 'media.onVoicePlay',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var onVoicePlayEnd = {
	  name: 'media.onVoicePlayEnd',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.85',
	    android: '>6.6.88',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var onAudioInterruptionBegin = {
	  name: 'media.onAudioInterruptionBegin',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onAudioInterruptionEnd = {
	  name: 'media.onAudioInterruptionEnd',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onRecognizeSpeech = {
	  name: 'media.onRecognizeSpeech',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var releaseRecognizeSpeech = {
	  name: 'media.releaseRecognizeSpeech',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var startRecognizeSpeech = {
	  name: 'media.startRecognizeSpeech',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.24.30',
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var readAloudStart = {
	  name: 'media.readAloudStart',
	  payload: {
	    content: {
	      type: String,
	      required: true
	    },
	    sceneId: {
	      type: Number
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var readAloudStop = {
	  name: 'media.readAloudStop',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onReadAloudReceive = {
	  name: 'media.onReadAloudReceive',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var forwardFiles = {
	  name: 'media.forwardFiles',
	  payload: {
	    list: {
	      type: Array,
	      required: true
	    } // type: {
	    //   type: String,
	    //   default: 'noCooperate'
	    // },
	    // fileIds: {
	    //   type: Array,
	    //   required: true
	    // },
	    // authority: {
	    //   type: Array,
	    //   default: []
	    // }

	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var media = [chooseImage, previewImage, compressImage, getImageInfo, chooseVideo, previewVideo, startRecord, stopRecord, onRecordEnd, playVoice, pauseVoice, stopVoice, onVoicePlay, onVoicePlayEnd, onAudioInterruptionBegin, onAudioInterruptionEnd, onRecognizeSpeech, releaseRecognizeSpeech, startRecognizeSpeech, readAloudStart, readAloudStop, onReadAloudReceive, forwardFiles];

	var getNetworkType = {
	  name: 'device.getNetworkType',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getNetworkInterface = {
	  name: 'device.getNetworkInterface',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getLocation = {
	  name: 'device.getLocation',
	  payload: {
	    coordinateType: {
	      type: String,
	      default: 'wgs84'
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getSystemInfo = {
	  name: 'device.getSystemInfo',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.11.30',
	    android: '>=7.11.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var chooseLocation = {
	  name: 'device.chooseLocation',
	  payload: {
	    coordinateType: {
	      type: String,
	      default: 'wgs84'
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var displayLocation = {
	  name: 'device.displayLocation',
	  payload: {
	    coordinateType: {
	      type: String,
	      default: 'wgs84'
	    },
	    latitude: Number,
	    longitude: Number,
	    name: String,
	    address: String
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var scanCode = {
	  name: 'device.scanCode',
	  payload: {
	    type: {
	      type: Array,
	      default: ['qrCode', 'barCode']
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.15',
	    android: '>6.6.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var geoLocationStart = {
	  name: 'device.geoLocationStart',
	  payload: {
	    coordinateType: {
	      type: String,
	      default: 'wgs84'
	    },
	    targetAccuracy: Number,
	    iOSDistanceFilter: Number,
	    useCache: Boolean,
	    withReGeocode: Boolean,
	    callBackInterval: Number,
	    sceneId: String
	  },
	  type: 'call',
	  version: {
	    ios: '>7.23.15',
	    android: '>7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var geoLocationStop = {
	  name: 'device.geoLocationStop',
	  payload: {
	    sceneId: String
	  },
	  type: 'call',
	  version: {
	    ios: '>7.23.15',
	    android: '>7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var geoLocationStatus = {
	  name: 'device.geoLocationStatus',
	  payload: {
	    sceneIds: Array
	  },
	  type: 'call',
	  version: {
	    ios: '>7.23.15',
	    android: '>7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onGeoLocationReceive = {
	  name: 'device.onGeoLocationReceive',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.23.15',
	    android: '>7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getHealthInfo = {
	  name: 'device.getHealthInfo',
	  payload: {
	    beginTime: {
	      type: Number
	    },
	    endTime: {
	      type: Number
	    },
	    type: {
	      type: Array,
	      required: true
	    },
	    authDescription: {
	      type: String
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.27.30',
	    android: '>=7.27.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var changeWifiStatus = {
	  name: 'device.changeWifiStatus',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onWifiStatusChange = {
	  name: 'device.onWifiStatusChange',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getWifiList = {
	  name: 'device.getWifiList',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var connectWifi = {
	  name: 'device.connectWifi',
	  payload: {
	    SSID: {
	      type: String,
	      required: true
	    },
	    BSSID: {
	      type: String
	    },
	    password: {
	      type: String,
	      default: ''
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getWifiInfo = {
	  name: 'device.getWifiInfo',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getWifiStatus = {
	  name: 'device.getWifiStatus',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setScreenBrightness = {
	  name: 'device.setScreenBrightness',
	  payload: {
	    brightness: {
	      type: Number,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setKeepScreenOn = {
	  name: 'device.setKeepScreenOn',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var makePhoneCall = {
	  name: 'device.makePhoneCall',
	  payload: {
	    phoneNumber: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var device = [getNetworkType, getNetworkInterface, getLocation, getSystemInfo, chooseLocation, displayLocation, scanCode, geoLocationStart, geoLocationStop, geoLocationStatus, onGeoLocationReceive, getHealthInfo, changeWifiStatus, onWifiStatusChange, getWifiList, connectWifi, getWifiInfo, getWifiStatus, setScreenBrightness, setKeepScreenOn, makePhoneCall];

	var setNavigationBarTitle = {
	  name: 'ui.setNavigationBarTitle',
	  payload: {
	    title: String
	  },
	  type: 'call',
	  version: {
	    ios: '>6.5.8',
	    android: '>6.5.8',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setNavigationBarMenu = {
	  name: 'ui.setNavigationBarMenu',
	  payload: {
	    type: {
	      type: String,
	      default: 'dropdown'
	    },
	    items: Array
	  },
	  type: 'call',
	  triggerName: 'internal.ui.onNavigationBarMenuClick',
	  version: {
	    ios: '>6.5.8',
	    android: '>6.5.8',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setNavigationBarBgColor = {
	  name: 'ui.setNavigationBarBgColor',
	  payload: {
	    color: String
	  },
	  type: 'call',
	  version: {
	    ios: '>7.6.30',
	    android: '>7.6.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var closeWindow = {
	  name: 'ui.closeWindow',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>6.5.8',
	    android: '>6.5.8',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var openView = {
	  name: 'ui.openView',
	  payload: {
	    mode: {
	      type: String,
	      default: 'webview'
	    },
	    navigationBarBackgroundColor: {
	      type: String,
	      default: '#4E74BB'
	    },
	    navigationBarFrontStyle: {
	      type: String,
	      default: 'white'
	    },
	    url: {
	      type: String,
	      required: true
	    },
	    useSplitScreen: {
	      type: Boolean,
	      default: false
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var resetView = {
	  name: 'ui.resetView',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var rotateView = {
	  name: 'ui.rotateView',
	  payload: {
	    showStatusBar: {
	      type: Boolean,
	      default: true
	    },
	    clockwise: {
	      type: Boolean,
	      default: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var webViewBounce = {
	  name: 'ui.webViewBounce',
	  payload: {
	    enable: {
	      type: Boolean,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onViewPause = {
	  name: 'ui.onViewPause',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onViewResume = {
	  name: 'ui.onViewResume',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onHistoryBack = {
	  name: 'ui.onHistoryBack',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var setExtendedView = {
	  name: 'ui.setExtendedView',
	  payload: {
	    fullscreen: Boolean
	  },
	  type: 'call',
	  version: {
	    ios: '>7.0.61',
	    android: '>7.0.61',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getThemeInfo = {
	  name: 'ui.getThemeInfo',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>7.0.70',
	    android: '>7.0.70',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var openApp = {
	  name: 'ui.openApp',
	  payload: {
	    type: {
	      type: String,
	      required: true
	    },
	    url: {
	      type: String,
	      required: true
	    },
	    appId: {
	      type: String,
	      required: true
	    },
	    data: {
	      type: String,
	      default: ''
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setScreenDirection = {
	  name: 'ui.setScreenDirection',
	  payload: {
	    direction: {
	      type: Number,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onCloseWindow = {
	  name: 'ui.onCloseWindow',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var setActionSheet = {
	  name: 'ui.setActionSheet',
	  payload: {
	    items: Array
	  },
	  type: 'call',
	  triggerName: 'internal.ui.onActionSheetClick',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var resizeWindow = {
	  name: 'ui.resizeWindow',
	  payload: {
	    action: {
	      type: String,
	      required: true
	    },
	    size: {
	      type: Array
	    },
	    location: {
	      type: String
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var ui = [setNavigationBarTitle, setNavigationBarMenu, setNavigationBarBgColor, closeWindow, openView, resetView, rotateView, webViewBounce, setExtendedView, onViewPause, onViewResume, onHistoryBack, getThemeInfo, openApp, setScreenDirection, onCloseWindow, setActionSheet, resizeWindow // onThemeInfoChange
	];

	var requestPayment = {
	  name: 'pay.requestPayment',
	  payload: {
	    appId: {
	      type: String,
	      required: true
	    },
	    orderId: {
	      type: String,
	      required: true
	    },
	    token: {
	      type: String,
	      required: true
	    },
	    package: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.5.8',
	    android: '>6.5.8',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var pay = [requestPayment];

	var share = {
	  name: 'utils.share',
	  payload: {
	    title: String,
	    content: String,
	    url: String,
	    pcUrl: String,
	    image: String
	  },
	  type: 'call',
	  version: {
	    ios: '>6.5.0',
	    android: '>6.5.0',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var uploadFile = {
	  name: 'utils.uploadFile',
	  payload: {
	    url: String,
	    localId: String,
	    name: String,
	    headers: Object,
	    formData: [Object, FormData]
	  },
	  type: 'call',
	  version: {
	    ios: '>6.0.2',
	    android: '>6.0.0',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var uploadFileToS3 = {
	  name: 'utils.uploadFileToS3',
	  payload: {
	    localId: String,
	    endpoint: String,
	    accessKey: String,
	    secretKey: String,
	    sessionToken: String,
	    region: String,
	    bucket: String,
	    object: String
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var uploadFileToS3InChunks = {
	  name: 'utils.uploadFileToS3InChunks',
	  payload: {
	    localId: String,
	    endpoint: String,
	    accessKey: String,
	    secretKey: String,
	    sessionToken: String,
	    region: String,
	    bucket: String,
	    object: String,
	    chunkSize: Number,
	    maxChunkSize: Number,
	    maxChunkNumber: Number
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.12.15',
	    android: '>=7.12.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var downloadFile = {
	  name: 'utils.downloadFile',
	  payload: {
	    url: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var previewFile = {
	  name: 'utils.previewFile',
	  payload: {
	    url: {
	      type: String,
	      required: true
	    },
	    name: String,
	    size: Number,
	    type: String
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var saveFile = {
	  name: 'utils.saveFile',
	  payload: {
	    url: {
	      type: String,
	      required: true
	    },
	    target: {
	      type: Array,
	      default: ['local', 'cloud']
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var signFile = {
	  name: 'utils.signFile',
	  payload: {
	    platform: {
	      type: String,
	      required: true
	    },
	    url: {
	      type: String,
	      required: true
	    },
	    mode: {
	      type: String,
	      required: true
	    },
	    permissions: {
	      type: Array,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: undefined,
	    android: undefined,
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onUploadProgress = {
	  name: 'utils.onUploadProgress',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var onDownloadProgress = {
	  name: 'utils.onDownloadProgress',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>6.6.45',
	    android: '>6.6.45',
	    windows: '>6.6.110',
	    mac: '>6.6.202'
	  }
	};

	var utils = [share, uploadFile, uploadFileToS3, uploadFileToS3InChunks, downloadFile, previewFile, saveFile, signFile, onUploadProgress, onDownloadProgress];

	var getVisitorToken$1 = {
	  name: 'internal.biz.getVisitorToken',
	  payload: {},
	  type: 'call'
	};

	var getCECAuthMessage = {
	  name: 'internal.biz.getCECAuthMessage',
	  payload: {},
	  type: 'call'
	};

	var getCECAuthXml = {
	  name: 'internal.biz.getCECAuthXml',
	  payload: {
	    appId: {
	      appId: String,
	      required: true
	    },
	    content: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call'
	};

	var getClientCert = {
	  name: 'internal.jtb.utils.getClientCert',
	  payload: {
	    type: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call'
	};

	var getElectronicSignature = {
	  name: 'internal.jtb.utils.getElectronicSignature',
	  payload: {
	    content: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call'
	};

	var idCardNfcReader = {
	  name: 'internal.ga.device.idCardNfcReader',
	  payload: {
	    nfcDeviceType: {
	      type: Number,
	      default: 0
	    }
	  },
	  type: 'call',
	  version: {
	    ios: undefined,
	    android: '>=7.24.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onNFCReadMessage = {
	  name: 'internal.nmga.device.onNFCReadMessage',
	  payload: undefined,
	  type: 'listen'
	};

	var startNFCReader = {
	  name: 'internal.nmga.device.startNFCReader',
	  payload: {},
	  type: 'call'
	};

	var stopNFCReader = {
	  name: 'internal.nmga.device.stopNFCReader',
	  payload: {},
	  type: 'call'
	};

	var fetchCockpitData = {
	  name: 'internal.biz.fetchCockpitData',
	  payload: {
	    api: {
	      api: String,
	      required: true
	    },
	    dataKey: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.27.30',
	    android: '>=7.27.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var getPlatformEndPoint = {
	  name: 'internal.biz.getPlatformEndPoint',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>=7.27.30',
	    android: '>=7.27.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onViewReady = {
	  name: 'ui.onViewReady',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: undefined,
	    android: '>=0.1.4(jsga)',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onReadAloudReceive$1 = {
	  name: 'internal.media.onReadAloudReceive',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var readAloudStart$1 = {
	  name: 'internal.media.readAloudStart',
	  payload: {
	    content: {
	      type: String,
	      required: true
	    },
	    sceneId: {
	      type: Number
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var readAloudStop$1 = {
	  name: 'internal.media.readAloudStop',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var onReceiveData = {
	  name: 'internal.go.onReceiveData',
	  type: 'listen',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var sendData = {
	  name: 'internal.go.sendData',
	  payload: {
	    data: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var wpsSignOff = {
	  name: 'internal.biz.wpsSignOff',
	  payload: {
	    fileName: {
	      type: String,
	      required: true
	    },
	    fileUrl: {
	      type: String,
	      required: true
	    },
	    saveUrl: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: undefined,
	    android: '>=7.26.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var notifyRegisterAction = {
	  name: 'internal.utils.notifyRegisterAction',
	  payload: {
	    type: {
	      type: String,
	      default: 'start'
	    },
	    api: {
	      type: String
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var internal = [getVisitorToken$1, getCECAuthMessage, getCECAuthXml, getClientCert, getElectronicSignature, idCardNfcReader, onNFCReadMessage, startNFCReader, stopNFCReader, fetchCockpitData, getPlatformEndPoint, onViewReady, onReadAloudReceive$1, readAloudStart$1, readAloudStop$1, onReceiveData, sendData, wpsSignOff, notifyRegisterAction];

	var get = {
	  name: 'storage.get',
	  payload: {
	    cacheKey: String
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var set = {
	  name: 'storage.set',
	  payload: {
	    cacheKey: String,
	    cacheValue: String
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var remove = {
	  name: 'storage.remove',
	  payload: {
	    cacheKey: String
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var clear = {
	  name: 'storage.clear',
	  payload: undefined,
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var batchGet = {
	  name: 'storage.batchGet',
	  payload: {
	    cacheKeys: {
	      type: Array,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var batchSet = {
	  name: 'storage.batchSet',
	  payload: {
	    cache: {
	      type: Object,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.23.15',
	    android: '>=7.23.15',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var storage = [get, set, remove, clear, batchGet, batchSet];

	var V1ApiList = [].concat(_toConsumableArray(device), _toConsumableArray(media), _toConsumableArray(biz), _toConsumableArray(ui), _toConsumableArray(pay), _toConsumableArray(utils), _toConsumableArray(internal), _toConsumableArray(storage));

	var getCloudControl = {
	  name: 'v2.biz.getCloudControl',
	  payload: {
	    key: {
	      type: String,
	      required: true,
	      description: 'interdata.OrgConfig_Type'
	    },
	    oid: {
	      type: Number,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var openChat$1 = {
	  name: 'v2.biz.openChat',
	  payload: {
	    chatId: {
	      type: Object,
	      required: true
	    },
	    msgId: {
	      type: Number,
	      required: false
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var biz$1 = [getCloudControl, openChat$1];

	var checkFilesDownloaded = {
	  title: '检查文件是否被下载',
	  name: 'v2.media.checkFilesDownloaded',
	  payload: {
	    mediaIds: {
	      type: Array,
	      required: true
	    },
	    oid: {
	      type: Number,
	      description: '应用调用必传！'
	    }
	  },
	  requestExample: "jssdkEdge.sdk.v2.media\n  .checkFilesDownloaded({\n    mediaIds: [\"5210112-XauPnTbLWrEeHwDKeDVF1pdm7Yuj6P\"],\n    oid:5210112\n  })\n  .then(data => {\n    console.log(\n      '%cdata: ',\n      'color: MidnightBlue; background: Aquamarine;',\n      data\n    );\n  });",
	  responseExample: "{\n    list:[\"\"]\n  }",
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var chooseFile = {
	  name: 'v2.media.chooseFile',
	  payload: {
	    type: {
	      type: String,
	      default: 'local'
	    },
	    mediaType: {
	      type: Array
	    },
	    maxCount: {
	      type: Number,
	      default: 10
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var downloadFile$1 = {
	  name: 'v2.media.downloadFile',
	  payload: {
	    mediaId: {
	      type: [String, Object],
	      required: true,
	      description: 'String:openId Object:mediaId{oid,fid}'
	    },
	    oid: {
	      type: Number,
	      required: true
	    },
	    cover: {
	      type: Boolean,
	      default: true
	    }
	  },
	  requestExample: "v2.media\n  .downloadFile({\n    mediaId: {\n      oid: 5210112,\n      fid: 1130496\n    }\n  })\n  .then(data => {\n    console.log(\n      '%cdata: ',\n      'color: MidnightBlue; background: Aquamarine;',\n      JSON.stringify(data)\n    );\n  })\n  .catch(err => {\n    console.error(err);\n  });",
	  responseExample: "{\n    \"path\": \"/Users/dulianqiang/Library/Containers/com.comisys.lanxin.ocmacTest/Data/Library/Application Support/lanxin_macgoh/fb35c29d//files/lanxindownload/PPT11.pptx\",\n    \"mediaId\": {\n      \"oid\": 5210112,\n      \"fid\": 1130496\n    }\n  }",
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var forwardFiles$1 = {
	  name: 'v2.media.forwardFiles',
	  payload: {
	    list: {
	      type: Array,
	      required: true
	    } // type: {
	    //   type: String,
	    //   default: 'noCooperate'
	    // },
	    // mediaIds: {
	    //   type: Array,
	    //   required: true
	    // },
	    // authority: {
	    //   type: Array,
	    //   default: []
	    // },
	    // needCopy: {
	    //   type: Boolean,
	    //   default: false
	    // }

	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var getAuthority = {
	  name: 'v2.media.getAuthority',
	  description: '获取文件权限 metaInfo',
	  payload: {
	    ids: {
	      type: Array,
	      required: true,
	      description: 'String:openId,Array:[{id:xxx}]'
	    },
	    oid: {
	      type: Number,
	      required: true
	    },
	    spaceType: {
	      type: String,
	      description: 'interdata.CoreSpaceType.COM_WORK_DOCUMENT'
	    }
	  },
	  payloadExample: {
	    oid: 0,
	    ids: [{
	      id: 'xxxxx' // openId

	    }],
	    spaceType: 5
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var getDragFiles = {
	  name: 'v2.media.getDragFiles',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var getMediaBase64 = {
	  name: 'v2.media.getMediaBase64',
	  payload: {
	    mediaId: {
	      type: Object,
	      required: true
	    },
	    spec: {
	      type: String
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var getTemplateFile = {
	  name: 'v2.media.getTemplateFile',
	  payload: {
	    type: {
	      type: String,
	      required: true,
	      default: 'doc'
	    },
	    name: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var onDownloadPrograss = {
	  name: 'v2.media.onDownloadPrograss',
	  payload: undefined,
	  type: 'listen',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var openLocalFile = {
	  name: 'v2.media.openLocalFile',
	  payload: {
	    mediaId: {
	      type: Object,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var deleteCloudDiskFile = {
	  name: 'v2.media.deleteCloudDiskFile',
	  description: '删除云盘文件',
	  payload: {
	    ids: {
	      type: [Array, String],
	      required: true,
	      description: 'String:openId,Array:[{id:xxx}]'
	    },
	    oid: {
	      type: Number,
	      description: '应用调用必传！'
	    },
	    spaceType: {
	      type: String,
	      description: 'interdata.CoreDocumentSpaceType'
	    }
	  },
	  requestExample: "v2.media.deleteCloudDiskFile({ids:\"xxx\",oid:111}).then(data=>{\n    console.log(data)\n  }).catch(err){\n    console.error(err)\n  }",
	  responseExample: "{\n    \"openId\":{\n      oid:xxx,\n      fid:xxx\n    },\n    ...\n  }",
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var renameCloudDiskFile = {
	  name: 'v2.media.renameCloudDiskFile',
	  description: '重命名云盘文件',
	  payload: {
	    oid: {
	      type: Number,
	      description: '应用调用必传！'
	    },
	    name: {
	      type: String,
	      required: true,
	      description: '带后缀的文件名'
	    },
	    id: {
	      type: String,
	      required: true,
	      description: 'openId'
	    },
	    spaceId: {
	      type: Object,
	      description: 'interdata.CoreSpaceId'
	    },
	    spaceType: {
	      type: String,
	      description: 'interdata.CoreDocumentSpaceType'
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var notifyMediaCooperationChanged = {
	  name: 'v2.media.notifyMediaCooperationChanged',
	  description: '协作文件修改通知',
	  payload: {
	    oid: {
	      type: Number,
	      required: true
	    },
	    id: {
	      type: String,
	      required: true
	    },
	    spaceType: {
	      type: String,
	      required: true,
	      default: 'COM_WORK_DOCUMENT',
	      description: 'interdata.CoreSpaceType.COM_WORK_DOCUMENT'
	    },
	    notifyType: {
	      type: String,
	      description: 'interdata.CoreCooperationNotify.NotifyType'
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var fetchSelfCoopPermissionMeta = {
	  title: '获取文档协同权限',
	  name: 'v2.media.fetchSelfCoopPermissionMeta',
	  description: '获取协同权限',
	  payload: {
	    id: {
	      type: String,
	      required: true,
	      description: 'String:openId'
	    },
	    oid: {
	      type: Number,
	      required: true
	    },
	    type: {
	      type: String,
	      default: 'MEDIA_ID',
	      description: '参考interdata.CoreOpenIdType'
	    },
	    spaceType: {
	      type: String,
	      default: 'COM_WORK_DOCUMENT',
	      description: '文件来源，参考interdata.CoreSpaceType'
	    }
	  },
	  requestExample: "v2.media.fetchSelfCoopPermissionMeta({id:\"xxx\",oid:111}).then(data=>{\n    console.log(data)\n  }).catch(err){\n    console.error(err)\n  }",
	  responseExample: "{\n    \"openId\":{\n      oid:xxx,\n      fid:xxx\n    },\n    ...\n  }",
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>7.29.30',
	    mac: '>7.29.30'
	  }
	};

	var saveAs = {
	  name: 'v2.media.saveAs',
	  payload: {
	    mediaId: {
	      type: Object,
	      required: true
	    },
	    path: {
	      type: String,
	      required: false
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: undefined,
	    mac: undefined
	  }
	};

	var media$1 = [checkFilesDownloaded, chooseFile, downloadFile$1, forwardFiles$1, getAuthority, getDragFiles, getMediaBase64, getTemplateFile, onDownloadPrograss, openLocalFile, renameCloudDiskFile, deleteCloudDiskFile, notifyMediaCooperationChanged, fetchSelfCoopPermissionMeta, saveAs];

	// 仅支持lxs
	var getAuthority$1 = {
	  name: 'v2.utils.getAuthority',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	// 仅支持lxs
	var setLog = {
	  name: 'v2.utils.setLog',
	  payload: {
	    level: {
	      type: String,
	      default: 'INFO'
	    },
	    content: {
	      type: String,
	      required: true
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	// 仅支持lxs
	var openId2CoreId = {
	  title: '应用OpenId转CoreId',
	  name: 'v2.utils.openId2CoreId',
	  description: '提供应用Id向核心Id转换的能力',
	  payload: {
	    oid: {
	      type: Number,
	      required: true
	    },
	    ids: {
	      type: Array,
	      required: true,
	      description: '[{id:xxx},{id:xxx}]'
	    },
	    type: {
	      type: String,
	      required: true,
	      default: 'MEDIA_ID',
	      description: '转换的ID类型 ，参考interdata.CoreOpenIdType'
	    }
	  },
	  requestExample: "v2.utils\n  .openId2CoreId({\n    ids: [\n      {\n        id: '5210112-K2u8kIReymO6Crg8KgxHnnWkHnglnE'\n      }\n    ],\n    type: 'STAFF_ID',\n    oid: 5210112\n  })\n  .then(data => {\n    console.log(\n      '%cdata: ',\n      'color: MidnightBlue; background: Aquamarine;',\n      data\n    );\n  })\n  .catch(err => {\n    console.error(err);\n  });",
	  responseExample: "{\n    5210112-K2u8kIReymO6Crg8KgxHnnWkHnglnE: {oid: 5210112, uid: 13238272}\n  }",
	  type: 'call',
	  version: {
	    ios: '>7.29.30',
	    android: '>7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var utils$1 = [getAuthority$1, setLog, openId2CoreId];

	var chooseContacts$1 = {
	  name: 'v2.contacts.chooseContacts',
	  payload: {
	    title: {
	      type: String
	    },
	    multiple: {
	      type: Boolean,
	      default: true
	    },
	    type: {
	      type: Array
	    },
	    canChooseExternal: {
	      type: Boolean,
	      default: false
	    },
	    max: {
	      type: Number
	    },
	    maxTip: {
	      type: String,
	      default: '选择数量超出最大限制'
	    },
	    existentStaffs: {
	      type: Array
	    },
	    existentSectors: {
	      type: Array
	    },
	    requiredStaffs: {
	      type: Array
	    },
	    requiredSectors: {
	      type: Array
	    },
	    selectGroupMembers: {
	      type: Boolean,
	      default: false
	    }
	  },
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var getVisitorInfo = {
	  name: 'v2.contacts.getVisitorInfo',
	  payload: {},
	  type: 'call',
	  version: {
	    ios: '>=7.29.30',
	    android: '>=7.29.30',
	    windows: '>=7.29.30',
	    mac: '>=7.29.30'
	  }
	};

	var contacts = [chooseContacts$1, getVisitorInfo];

	var V2ApiList = [].concat(_toConsumableArray(media$1), _toConsumableArray(biz$1), _toConsumableArray(utils$1), _toConsumableArray(contacts));

	var createForOfIteratorHelper = createCommonjsModule(function (module) {
	function _createForOfIteratorHelper(o, allowArrayLike) {
	  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

	  if (!it) {
	    if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
	      if (it) o = it;
	      var i = 0;

	      var F = function F() {};

	      return {
	        s: F,
	        n: function n() {
	          if (i >= o.length) return {
	            done: true
	          };
	          return {
	            done: false,
	            value: o[i++]
	          };
	        },
	        e: function e(_e) {
	          throw _e;
	        },
	        f: F
	      };
	    }

	    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
	  }

	  var normalCompletion = true,
	      didErr = false,
	      err;
	  return {
	    s: function s() {
	      it = it.call(o);
	    },
	    n: function n() {
	      var step = it.next();
	      normalCompletion = step.done;
	      return step;
	    },
	    e: function e(_e2) {
	      didErr = true;
	      err = _e2;
	    },
	    f: function f() {
	      try {
	        if (!normalCompletion && it["return"] != null) it["return"]();
	      } finally {
	        if (didErr) throw err;
	      }
	    }
	  };
	}

	module.exports = _createForOfIteratorHelper;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _createForOfIteratorHelper = /*@__PURE__*/getDefaultExportFromCjs(createForOfIteratorHelper);

	// koa-compose https://github.com/koajs/compose
	function compose(middleware) {
	  if (!Array.isArray(middleware)) {
	    throw new TypeError('Middleware stack must be an array!');
	  }

	  var _iterator = _createForOfIteratorHelper(middleware),
	      _step;

	  try {
	    for (_iterator.s(); !(_step = _iterator.n()).done;) {
	      var fn = _step.value;

	      if (typeof fn !== 'function') {
	        throw new TypeError('Middleware must be composed of functions!');
	      }
	    }
	  } catch (err) {
	    _iterator.e(err);
	  } finally {
	    _iterator.f();
	  }

	  return function (context, next) {
	    // last called middleware #
	    var index = -1;
	    return dispatch(0);

	    function dispatch(i) {
	      if (i <= index) {
	        return Promise.reject(new Error('next() called multiple times'));
	      }

	      index = i;
	      var fn = middleware[i];
	      if (i === middleware.length) fn = next;
	      if (!fn) return Promise.resolve();

	      try {
	        return Promise.resolve(fn(context, function next() {
	          return dispatch(i + 1);
	        }));
	      } catch (err) {
	        return Promise.reject(err);
	      }
	    }
	  };
	}

	var callMiddlewareList = [];
	var bridge = {
	  proxy: function proxy(apiMeta, req) {
	    return new Promise(function (resolve, reject) {
	      compose(callMiddlewareList)({
	        apiMeta: apiMeta,
	        req: req
	      }).then(function (context) {
	        if (apiMeta.type === 'call') {
	          var _context$res = context.res,
	              status = _context$res.status,
	              data = _context$res.data,
	              callbackType = _context$res.callbackType; // 判断当前结果返回类型

	          if (callbackType === CALLBACK_TYPE.PROMISE) {
	            if (status && status.code === 0) {
	              resolve(data);
	            } else {
	              reject(status);
	            }
	          }
	        }
	      });
	    });
	  },
	  use: function use(middleware) {
	    callMiddlewareList.push(middleware);
	  }
	};

	var runtime_1 = createCommonjsModule(function (module) {
	/**
	 * Copyright (c) 2014-present, Facebook, Inc.
	 *
	 * This source code is licensed under the MIT license found in the
	 * LICENSE file in the root directory of this source tree.
	 */

	var runtime = (function (exports) {

	  var Op = Object.prototype;
	  var hasOwn = Op.hasOwnProperty;
	  var undefined$1; // More compressible than void 0.
	  var $Symbol = typeof Symbol === "function" ? Symbol : {};
	  var iteratorSymbol = $Symbol.iterator || "@@iterator";
	  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
	  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

	  function define(obj, key, value) {
	    Object.defineProperty(obj, key, {
	      value: value,
	      enumerable: true,
	      configurable: true,
	      writable: true
	    });
	    return obj[key];
	  }
	  try {
	    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
	    define({}, "");
	  } catch (err) {
	    define = function(obj, key, value) {
	      return obj[key] = value;
	    };
	  }

	  function wrap(innerFn, outerFn, self, tryLocsList) {
	    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
	    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
	    var generator = Object.create(protoGenerator.prototype);
	    var context = new Context(tryLocsList || []);

	    // The ._invoke method unifies the implementations of the .next,
	    // .throw, and .return methods.
	    generator._invoke = makeInvokeMethod(innerFn, self, context);

	    return generator;
	  }
	  exports.wrap = wrap;

	  // Try/catch helper to minimize deoptimizations. Returns a completion
	  // record like context.tryEntries[i].completion. This interface could
	  // have been (and was previously) designed to take a closure to be
	  // invoked without arguments, but in all the cases we care about we
	  // already have an existing method we want to call, so there's no need
	  // to create a new function object. We can even get away with assuming
	  // the method takes exactly one argument, since that happens to be true
	  // in every case, so we don't have to touch the arguments object. The
	  // only additional allocation required is the completion record, which
	  // has a stable shape and so hopefully should be cheap to allocate.
	  function tryCatch(fn, obj, arg) {
	    try {
	      return { type: "normal", arg: fn.call(obj, arg) };
	    } catch (err) {
	      return { type: "throw", arg: err };
	    }
	  }

	  var GenStateSuspendedStart = "suspendedStart";
	  var GenStateSuspendedYield = "suspendedYield";
	  var GenStateExecuting = "executing";
	  var GenStateCompleted = "completed";

	  // Returning this object from the innerFn has the same effect as
	  // breaking out of the dispatch switch statement.
	  var ContinueSentinel = {};

	  // Dummy constructor functions that we use as the .constructor and
	  // .constructor.prototype properties for functions that return Generator
	  // objects. For full spec compliance, you may wish to configure your
	  // minifier not to mangle the names of these two functions.
	  function Generator() {}
	  function GeneratorFunction() {}
	  function GeneratorFunctionPrototype() {}

	  // This is a polyfill for %IteratorPrototype% for environments that
	  // don't natively support it.
	  var IteratorPrototype = {};
	  define(IteratorPrototype, iteratorSymbol, function () {
	    return this;
	  });

	  var getProto = Object.getPrototypeOf;
	  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
	  if (NativeIteratorPrototype &&
	      NativeIteratorPrototype !== Op &&
	      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
	    // This environment has a native %IteratorPrototype%; use it instead
	    // of the polyfill.
	    IteratorPrototype = NativeIteratorPrototype;
	  }

	  var Gp = GeneratorFunctionPrototype.prototype =
	    Generator.prototype = Object.create(IteratorPrototype);
	  GeneratorFunction.prototype = GeneratorFunctionPrototype;
	  define(Gp, "constructor", GeneratorFunctionPrototype);
	  define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
	  GeneratorFunction.displayName = define(
	    GeneratorFunctionPrototype,
	    toStringTagSymbol,
	    "GeneratorFunction"
	  );

	  // Helper for defining the .next, .throw, and .return methods of the
	  // Iterator interface in terms of a single ._invoke method.
	  function defineIteratorMethods(prototype) {
	    ["next", "throw", "return"].forEach(function(method) {
	      define(prototype, method, function(arg) {
	        return this._invoke(method, arg);
	      });
	    });
	  }

	  exports.isGeneratorFunction = function(genFun) {
	    var ctor = typeof genFun === "function" && genFun.constructor;
	    return ctor
	      ? ctor === GeneratorFunction ||
	        // For the native GeneratorFunction constructor, the best we can
	        // do is to check its .name property.
	        (ctor.displayName || ctor.name) === "GeneratorFunction"
	      : false;
	  };

	  exports.mark = function(genFun) {
	    if (Object.setPrototypeOf) {
	      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
	    } else {
	      genFun.__proto__ = GeneratorFunctionPrototype;
	      define(genFun, toStringTagSymbol, "GeneratorFunction");
	    }
	    genFun.prototype = Object.create(Gp);
	    return genFun;
	  };

	  // Within the body of any async function, `await x` is transformed to
	  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
	  // `hasOwn.call(value, "__await")` to determine if the yielded value is
	  // meant to be awaited.
	  exports.awrap = function(arg) {
	    return { __await: arg };
	  };

	  function AsyncIterator(generator, PromiseImpl) {
	    function invoke(method, arg, resolve, reject) {
	      var record = tryCatch(generator[method], generator, arg);
	      if (record.type === "throw") {
	        reject(record.arg);
	      } else {
	        var result = record.arg;
	        var value = result.value;
	        if (value &&
	            typeof value === "object" &&
	            hasOwn.call(value, "__await")) {
	          return PromiseImpl.resolve(value.__await).then(function(value) {
	            invoke("next", value, resolve, reject);
	          }, function(err) {
	            invoke("throw", err, resolve, reject);
	          });
	        }

	        return PromiseImpl.resolve(value).then(function(unwrapped) {
	          // When a yielded Promise is resolved, its final value becomes
	          // the .value of the Promise<{value,done}> result for the
	          // current iteration.
	          result.value = unwrapped;
	          resolve(result);
	        }, function(error) {
	          // If a rejected Promise was yielded, throw the rejection back
	          // into the async generator function so it can be handled there.
	          return invoke("throw", error, resolve, reject);
	        });
	      }
	    }

	    var previousPromise;

	    function enqueue(method, arg) {
	      function callInvokeWithMethodAndArg() {
	        return new PromiseImpl(function(resolve, reject) {
	          invoke(method, arg, resolve, reject);
	        });
	      }

	      return previousPromise =
	        // If enqueue has been called before, then we want to wait until
	        // all previous Promises have been resolved before calling invoke,
	        // so that results are always delivered in the correct order. If
	        // enqueue has not been called before, then it is important to
	        // call invoke immediately, without waiting on a callback to fire,
	        // so that the async generator function has the opportunity to do
	        // any necessary setup in a predictable way. This predictability
	        // is why the Promise constructor synchronously invokes its
	        // executor callback, and why async functions synchronously
	        // execute code before the first await. Since we implement simple
	        // async functions in terms of async generators, it is especially
	        // important to get this right, even though it requires care.
	        previousPromise ? previousPromise.then(
	          callInvokeWithMethodAndArg,
	          // Avoid propagating failures to Promises returned by later
	          // invocations of the iterator.
	          callInvokeWithMethodAndArg
	        ) : callInvokeWithMethodAndArg();
	    }

	    // Define the unified helper method that is used to implement .next,
	    // .throw, and .return (see defineIteratorMethods).
	    this._invoke = enqueue;
	  }

	  defineIteratorMethods(AsyncIterator.prototype);
	  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
	    return this;
	  });
	  exports.AsyncIterator = AsyncIterator;

	  // Note that simple async functions are implemented on top of
	  // AsyncIterator objects; they just return a Promise for the value of
	  // the final result produced by the iterator.
	  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
	    if (PromiseImpl === void 0) PromiseImpl = Promise;

	    var iter = new AsyncIterator(
	      wrap(innerFn, outerFn, self, tryLocsList),
	      PromiseImpl
	    );

	    return exports.isGeneratorFunction(outerFn)
	      ? iter // If outerFn is a generator, return the full iterator.
	      : iter.next().then(function(result) {
	          return result.done ? result.value : iter.next();
	        });
	  };

	  function makeInvokeMethod(innerFn, self, context) {
	    var state = GenStateSuspendedStart;

	    return function invoke(method, arg) {
	      if (state === GenStateExecuting) {
	        throw new Error("Generator is already running");
	      }

	      if (state === GenStateCompleted) {
	        if (method === "throw") {
	          throw arg;
	        }

	        // Be forgiving, per 25.3.3.3.3 of the spec:
	        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
	        return doneResult();
	      }

	      context.method = method;
	      context.arg = arg;

	      while (true) {
	        var delegate = context.delegate;
	        if (delegate) {
	          var delegateResult = maybeInvokeDelegate(delegate, context);
	          if (delegateResult) {
	            if (delegateResult === ContinueSentinel) continue;
	            return delegateResult;
	          }
	        }

	        if (context.method === "next") {
	          // Setting context._sent for legacy support of Babel's
	          // function.sent implementation.
	          context.sent = context._sent = context.arg;

	        } else if (context.method === "throw") {
	          if (state === GenStateSuspendedStart) {
	            state = GenStateCompleted;
	            throw context.arg;
	          }

	          context.dispatchException(context.arg);

	        } else if (context.method === "return") {
	          context.abrupt("return", context.arg);
	        }

	        state = GenStateExecuting;

	        var record = tryCatch(innerFn, self, context);
	        if (record.type === "normal") {
	          // If an exception is thrown from innerFn, we leave state ===
	          // GenStateExecuting and loop back for another invocation.
	          state = context.done
	            ? GenStateCompleted
	            : GenStateSuspendedYield;

	          if (record.arg === ContinueSentinel) {
	            continue;
	          }

	          return {
	            value: record.arg,
	            done: context.done
	          };

	        } else if (record.type === "throw") {
	          state = GenStateCompleted;
	          // Dispatch the exception by looping back around to the
	          // context.dispatchException(context.arg) call above.
	          context.method = "throw";
	          context.arg = record.arg;
	        }
	      }
	    };
	  }

	  // Call delegate.iterator[context.method](context.arg) and handle the
	  // result, either by returning a { value, done } result from the
	  // delegate iterator, or by modifying context.method and context.arg,
	  // setting context.delegate to null, and returning the ContinueSentinel.
	  function maybeInvokeDelegate(delegate, context) {
	    var method = delegate.iterator[context.method];
	    if (method === undefined$1) {
	      // A .throw or .return when the delegate iterator has no .throw
	      // method always terminates the yield* loop.
	      context.delegate = null;

	      if (context.method === "throw") {
	        // Note: ["return"] must be used for ES3 parsing compatibility.
	        if (delegate.iterator["return"]) {
	          // If the delegate iterator has a return method, give it a
	          // chance to clean up.
	          context.method = "return";
	          context.arg = undefined$1;
	          maybeInvokeDelegate(delegate, context);

	          if (context.method === "throw") {
	            // If maybeInvokeDelegate(context) changed context.method from
	            // "return" to "throw", let that override the TypeError below.
	            return ContinueSentinel;
	          }
	        }

	        context.method = "throw";
	        context.arg = new TypeError(
	          "The iterator does not provide a 'throw' method");
	      }

	      return ContinueSentinel;
	    }

	    var record = tryCatch(method, delegate.iterator, context.arg);

	    if (record.type === "throw") {
	      context.method = "throw";
	      context.arg = record.arg;
	      context.delegate = null;
	      return ContinueSentinel;
	    }

	    var info = record.arg;

	    if (! info) {
	      context.method = "throw";
	      context.arg = new TypeError("iterator result is not an object");
	      context.delegate = null;
	      return ContinueSentinel;
	    }

	    if (info.done) {
	      // Assign the result of the finished delegate to the temporary
	      // variable specified by delegate.resultName (see delegateYield).
	      context[delegate.resultName] = info.value;

	      // Resume execution at the desired location (see delegateYield).
	      context.next = delegate.nextLoc;

	      // If context.method was "throw" but the delegate handled the
	      // exception, let the outer generator proceed normally. If
	      // context.method was "next", forget context.arg since it has been
	      // "consumed" by the delegate iterator. If context.method was
	      // "return", allow the original .return call to continue in the
	      // outer generator.
	      if (context.method !== "return") {
	        context.method = "next";
	        context.arg = undefined$1;
	      }

	    } else {
	      // Re-yield the result returned by the delegate method.
	      return info;
	    }

	    // The delegate iterator is finished, so forget it and continue with
	    // the outer generator.
	    context.delegate = null;
	    return ContinueSentinel;
	  }

	  // Define Generator.prototype.{next,throw,return} in terms of the
	  // unified ._invoke helper method.
	  defineIteratorMethods(Gp);

	  define(Gp, toStringTagSymbol, "Generator");

	  // A Generator should always return itself as the iterator object when the
	  // @@iterator function is called on it. Some browsers' implementations of the
	  // iterator prototype chain incorrectly implement this, causing the Generator
	  // object to not be returned from this call. This ensures that doesn't happen.
	  // See https://github.com/facebook/regenerator/issues/274 for more details.
	  define(Gp, iteratorSymbol, function() {
	    return this;
	  });

	  define(Gp, "toString", function() {
	    return "[object Generator]";
	  });

	  function pushTryEntry(locs) {
	    var entry = { tryLoc: locs[0] };

	    if (1 in locs) {
	      entry.catchLoc = locs[1];
	    }

	    if (2 in locs) {
	      entry.finallyLoc = locs[2];
	      entry.afterLoc = locs[3];
	    }

	    this.tryEntries.push(entry);
	  }

	  function resetTryEntry(entry) {
	    var record = entry.completion || {};
	    record.type = "normal";
	    delete record.arg;
	    entry.completion = record;
	  }

	  function Context(tryLocsList) {
	    // The root entry object (effectively a try statement without a catch
	    // or a finally block) gives us a place to store values thrown from
	    // locations where there is no enclosing try statement.
	    this.tryEntries = [{ tryLoc: "root" }];
	    tryLocsList.forEach(pushTryEntry, this);
	    this.reset(true);
	  }

	  exports.keys = function(object) {
	    var keys = [];
	    for (var key in object) {
	      keys.push(key);
	    }
	    keys.reverse();

	    // Rather than returning an object with a next method, we keep
	    // things simple and return the next function itself.
	    return function next() {
	      while (keys.length) {
	        var key = keys.pop();
	        if (key in object) {
	          next.value = key;
	          next.done = false;
	          return next;
	        }
	      }

	      // To avoid creating an additional object, we just hang the .value
	      // and .done properties off the next function object itself. This
	      // also ensures that the minifier will not anonymize the function.
	      next.done = true;
	      return next;
	    };
	  };

	  function values(iterable) {
	    if (iterable) {
	      var iteratorMethod = iterable[iteratorSymbol];
	      if (iteratorMethod) {
	        return iteratorMethod.call(iterable);
	      }

	      if (typeof iterable.next === "function") {
	        return iterable;
	      }

	      if (!isNaN(iterable.length)) {
	        var i = -1, next = function next() {
	          while (++i < iterable.length) {
	            if (hasOwn.call(iterable, i)) {
	              next.value = iterable[i];
	              next.done = false;
	              return next;
	            }
	          }

	          next.value = undefined$1;
	          next.done = true;

	          return next;
	        };

	        return next.next = next;
	      }
	    }

	    // Return an iterator with no values.
	    return { next: doneResult };
	  }
	  exports.values = values;

	  function doneResult() {
	    return { value: undefined$1, done: true };
	  }

	  Context.prototype = {
	    constructor: Context,

	    reset: function(skipTempReset) {
	      this.prev = 0;
	      this.next = 0;
	      // Resetting context._sent for legacy support of Babel's
	      // function.sent implementation.
	      this.sent = this._sent = undefined$1;
	      this.done = false;
	      this.delegate = null;

	      this.method = "next";
	      this.arg = undefined$1;

	      this.tryEntries.forEach(resetTryEntry);

	      if (!skipTempReset) {
	        for (var name in this) {
	          // Not sure about the optimal order of these conditions:
	          if (name.charAt(0) === "t" &&
	              hasOwn.call(this, name) &&
	              !isNaN(+name.slice(1))) {
	            this[name] = undefined$1;
	          }
	        }
	      }
	    },

	    stop: function() {
	      this.done = true;

	      var rootEntry = this.tryEntries[0];
	      var rootRecord = rootEntry.completion;
	      if (rootRecord.type === "throw") {
	        throw rootRecord.arg;
	      }

	      return this.rval;
	    },

	    dispatchException: function(exception) {
	      if (this.done) {
	        throw exception;
	      }

	      var context = this;
	      function handle(loc, caught) {
	        record.type = "throw";
	        record.arg = exception;
	        context.next = loc;

	        if (caught) {
	          // If the dispatched exception was caught by a catch block,
	          // then let that catch block handle the exception normally.
	          context.method = "next";
	          context.arg = undefined$1;
	        }

	        return !! caught;
	      }

	      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
	        var entry = this.tryEntries[i];
	        var record = entry.completion;

	        if (entry.tryLoc === "root") {
	          // Exception thrown outside of any try block that could handle
	          // it, so set the completion value of the entire function to
	          // throw the exception.
	          return handle("end");
	        }

	        if (entry.tryLoc <= this.prev) {
	          var hasCatch = hasOwn.call(entry, "catchLoc");
	          var hasFinally = hasOwn.call(entry, "finallyLoc");

	          if (hasCatch && hasFinally) {
	            if (this.prev < entry.catchLoc) {
	              return handle(entry.catchLoc, true);
	            } else if (this.prev < entry.finallyLoc) {
	              return handle(entry.finallyLoc);
	            }

	          } else if (hasCatch) {
	            if (this.prev < entry.catchLoc) {
	              return handle(entry.catchLoc, true);
	            }

	          } else if (hasFinally) {
	            if (this.prev < entry.finallyLoc) {
	              return handle(entry.finallyLoc);
	            }

	          } else {
	            throw new Error("try statement without catch or finally");
	          }
	        }
	      }
	    },

	    abrupt: function(type, arg) {
	      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
	        var entry = this.tryEntries[i];
	        if (entry.tryLoc <= this.prev &&
	            hasOwn.call(entry, "finallyLoc") &&
	            this.prev < entry.finallyLoc) {
	          var finallyEntry = entry;
	          break;
	        }
	      }

	      if (finallyEntry &&
	          (type === "break" ||
	           type === "continue") &&
	          finallyEntry.tryLoc <= arg &&
	          arg <= finallyEntry.finallyLoc) {
	        // Ignore the finally entry if control is not jumping to a
	        // location outside the try/catch block.
	        finallyEntry = null;
	      }

	      var record = finallyEntry ? finallyEntry.completion : {};
	      record.type = type;
	      record.arg = arg;

	      if (finallyEntry) {
	        this.method = "next";
	        this.next = finallyEntry.finallyLoc;
	        return ContinueSentinel;
	      }

	      return this.complete(record);
	    },

	    complete: function(record, afterLoc) {
	      if (record.type === "throw") {
	        throw record.arg;
	      }

	      if (record.type === "break" ||
	          record.type === "continue") {
	        this.next = record.arg;
	      } else if (record.type === "return") {
	        this.rval = this.arg = record.arg;
	        this.method = "return";
	        this.next = "end";
	      } else if (record.type === "normal" && afterLoc) {
	        this.next = afterLoc;
	      }

	      return ContinueSentinel;
	    },

	    finish: function(finallyLoc) {
	      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
	        var entry = this.tryEntries[i];
	        if (entry.finallyLoc === finallyLoc) {
	          this.complete(entry.completion, entry.afterLoc);
	          resetTryEntry(entry);
	          return ContinueSentinel;
	        }
	      }
	    },

	    "catch": function(tryLoc) {
	      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
	        var entry = this.tryEntries[i];
	        if (entry.tryLoc === tryLoc) {
	          var record = entry.completion;
	          if (record.type === "throw") {
	            var thrown = record.arg;
	            resetTryEntry(entry);
	          }
	          return thrown;
	        }
	      }

	      // The context.catch method must only be called with a location
	      // argument that corresponds to a known catch block.
	      throw new Error("illegal catch attempt");
	    },

	    delegateYield: function(iterable, resultName, nextLoc) {
	      this.delegate = {
	        iterator: values(iterable),
	        resultName: resultName,
	        nextLoc: nextLoc
	      };

	      if (this.method === "next") {
	        // Deliberately forget the last sent value so that we don't
	        // accidentally pass it on to the delegate.
	        this.arg = undefined$1;
	      }

	      return ContinueSentinel;
	    }
	  };

	  // Regardless of whether this script is executing as a CommonJS module
	  // or not, return the runtime object so that we can declare the variable
	  // regeneratorRuntime in the outer scope, which allows this module to be
	  // injected easily by `bin/regenerator --include-runtime script.js`.
	  return exports;

	}(
	  // If this script is executing as a CommonJS module, use module.exports
	  // as the regeneratorRuntime namespace. Otherwise create a new empty
	  // object. Either way, the resulting object will be used to initialize
	  // the regeneratorRuntime variable at the top of this file.
	   module.exports 
	));

	try {
	  regeneratorRuntime = runtime;
	} catch (accidentalStrictMode) {
	  // This module should not be running in strict mode, so the above
	  // assignment should always work unless something is misconfigured. Just
	  // in case runtime.js accidentally runs in strict mode, in modern engines
	  // we can explicitly access globalThis. In older engines we can escape
	  // strict mode using a global Function call. This could conceivably fail
	  // if a Content Security Policy forbids using Function, but in that case
	  // the proper solution is to fix the accidental strict mode problem. If
	  // you've misconfigured your bundler to force strict mode and applied a
	  // CSP to forbid Function, and you're not willing to fix either of those
	  // problems, please detail your unique predicament in a GitHub issue.
	  if (typeof globalThis === "object") {
	    globalThis.regeneratorRuntime = runtime;
	  } else {
	    Function("r", "regeneratorRuntime = r")(runtime);
	  }
	}
	});

	var regenerator = runtime_1;

	var asyncToGenerator = createCommonjsModule(function (module) {
	function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
	  try {
	    var info = gen[key](arg);
	    var value = info.value;
	  } catch (error) {
	    reject(error);
	    return;
	  }

	  if (info.done) {
	    resolve(value);
	  } else {
	    Promise.resolve(value).then(_next, _throw);
	  }
	}

	function _asyncToGenerator(fn) {
	  return function () {
	    var self = this,
	        args = arguments;
	    return new Promise(function (resolve, reject) {
	      var gen = fn.apply(self, args);

	      function _next(value) {
	        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
	      }

	      function _throw(err) {
	        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
	      }

	      _next(undefined);
	    });
	  };
	}

	module.exports = _asyncToGenerator;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _asyncToGenerator = /*@__PURE__*/getDefaultExportFromCjs(asyncToGenerator);

	var classCallCheck = createCommonjsModule(function (module) {
	function _classCallCheck(instance, Constructor) {
	  if (!(instance instanceof Constructor)) {
	    throw new TypeError("Cannot call a class as a function");
	  }
	}

	module.exports = _classCallCheck;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _classCallCheck = /*@__PURE__*/getDefaultExportFromCjs(classCallCheck);

	var createClass = createCommonjsModule(function (module) {
	function _defineProperties(target, props) {
	  for (var i = 0; i < props.length; i++) {
	    var descriptor = props[i];
	    descriptor.enumerable = descriptor.enumerable || false;
	    descriptor.configurable = true;
	    if ("value" in descriptor) descriptor.writable = true;
	    Object.defineProperty(target, descriptor.key, descriptor);
	  }
	}

	function _createClass(Constructor, protoProps, staticProps) {
	  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
	  if (staticProps) _defineProperties(Constructor, staticProps);
	  return Constructor;
	}

	module.exports = _createClass;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _createClass = /*@__PURE__*/getDefaultExportFromCjs(createClass);

	/**
	 * Checks if `value` is `undefined`.
	 *
	 * @static
	 * @since 0.1.0
	 * @memberOf _
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
	 * @example
	 *
	 * _.isUndefined(void 0);
	 * // => true
	 *
	 * _.isUndefined(null);
	 * // => false
	 */
	function isUndefined(value) {
	  return value === undefined;
	}

	var isUndefined_1 = isUndefined;

	// 根据 https://github.com/marcuswestin/WebViewJavascriptBridge
	// 修改项：
	// 1. window.WebViewJavascriptBridge -> window.LanxinJsBridge
	// 2. CUSTOM_PROTOCOL_SCHEME: http -> lx
	// 3. 修改了 _fetchQueue 函数
	// 4. 删除 _callWVJBCallbacks 函数，调用 bridge 之前一定已经初始化
	// 5. _handleMessageFromObjC -> _handleMessageFromNative
	//
	// 注意： 不要做其他修改，以便之后代码的维护与升级
	function bridge$1() {
	  if (window.LanxinJsBridge) {
	    return;
	  } // if (!window.onerror) {
	  //   window.onerror = function(msg, url, line) {
	  //     console.log('LanxinJsBridge: ERROR:' + msg + '@' + url + ':' + line);
	  //   };
	  // }


	  window.LanxinJsBridge = {
	    registerHandler: registerHandler,
	    callHandler: callHandler,
	    disableJavscriptAlertBoxSafetyTimeout: disableJavscriptAlertBoxSafetyTimeout,
	    _fetchQueue: _fetchQueue,
	    _checkHandler: _checkHandler,
	    _reset: _reset,
	    _handleMessageFromNative: _handleMessageFromNative
	  };
	  var messagingIframe;
	  var sendMessageQueue = [];
	  var messageHandlers = {};
	  var CUSTOM_PROTOCOL_SCHEME = 'lx';
	  var QUEUE_HAS_MESSAGE = '__wvjb_queue_message__';
	  var responseCallbacks = {};
	  var uniqueId = 1;
	  var dispatchMessagesWithTimeoutSafety = true;

	  function registerHandler(handlerName, handler) {
	    messageHandlers[handlerName] = handler;
	    callHandler('internal.utils.notifyRegisterAction', {
	      meta: {},
	      payload: {
	        type: 'start',
	        api: handlerName
	      }
	    });
	  }

	  function callHandler(handlerName, data, responseCallback) {
	    if (arguments.length === 2 && typeof data === 'function') {
	      responseCallback = data;
	      data = null;
	    }

	    _doSend({
	      handlerName: handlerName,
	      data: data
	    }, responseCallback);
	  }

	  function disableJavscriptAlertBoxSafetyTimeout() {
	    dispatchMessagesWithTimeoutSafety = false;
	  }

	  function _doSend(message, responseCallback) {
	    if (responseCallback) {
	      uniqueId++;
	      var callbackId = "cb_".concat(uniqueId, "_").concat(new Date().getTime());
	      responseCallbacks[callbackId] = responseCallback;
	      message.callbackId = callbackId;
	    }

	    sendMessageQueue.push(message);
		lx_client.call("".concat(CUSTOM_PROTOCOL_SCHEME, "://").concat(QUEUE_HAS_MESSAGE));
	    //messagingIframe.contentWindow.location.replace("".concat(CUSTOM_PROTOCOL_SCHEME, "://").concat(QUEUE_HAS_MESSAGE));
	  }

	  function _fetchQueue() {
	    var messageQueueString = JSON.stringify(sendMessageQueue);
	    sendMessageQueue = [];
	    // messagingIframe.contentWindow.location.replace("".concat(CUSTOM_PROTOCOL_SCHEME, "://return/_fetchQueue/").concat(messageQueueString));
		lx_client.call("".concat(CUSTOM_PROTOCOL_SCHEME, "://return/_fetchQueue/").concat(messageQueueString));
	  }

	  function _checkHandler(payload) {
	    payload = JSON.parse(payload);
	    var _payload = payload,
	        handlerName = _payload.handlerName,
	        callbackId = _payload.callbackId;
	    var responseData = {
	      callbackId: callbackId,
	      handlerName: handlerName,
	      result: !!messageHandlers[handlerName]
	    };
	    // messagingIframe.contentWindow.location.replace("".concat(CUSTOM_PROTOCOL_SCHEME, "://return/_checkHandler/").concat(JSON.stringify(responseData)));
		lx_client.call("".concat(CUSTOM_PROTOCOL_SCHEME, "://return/_checkHandler/").concat(JSON.stringify(responseData)));
	  }

	  function _reset() {
	    messageHandlers = {};
	    messageHandlers['_disableJavascriptAlertBoxSafetyTimeout'] = disableJavscriptAlertBoxSafetyTimeout; // registerHandler(
	    //   '_disableJavascriptAlertBoxSafetyTimeout',
	    //   disableJavscriptAlertBoxSafetyTimeout
	    // );
	  }

	  function _dispatchMessageFromObjC(messageJSON) {
	    if (dispatchMessagesWithTimeoutSafety) {
	      setTimeout(_doDispatchMessageFromObjC);
	    } else {
	      _doDispatchMessageFromObjC();
	    }

	    function _doDispatchMessageFromObjC() {
	      var message = JSON.parse(messageJSON); // var messageHandler;

	      var responseCallback;

	      if (message.responseId) {
	        responseCallback = responseCallbacks[message.responseId];

	        if (!responseCallback) {
	          return;
	        }

	        responseCallback(message.responseData);
	        delete responseCallbacks[message.responseId];
	      } else {
	        if (message.callbackId) {
	          var callbackResponseId = message.callbackId;

	          responseCallback = function responseCallback(responseData) {
	            _doSend({
	              handlerName: message.handlerName,
	              responseId: callbackResponseId,
	              responseData: responseData
	            });
	          };
	        }

	        var handler = messageHandlers[message.handlerName];

	        if (!handler) {
	          console.log('LanxinJsBridge: WARNING: no handler for message from ObjC:', message);
	        } else {
	          handler(message.data, responseCallback);
	        }
	      }
	    }
	  }

	  function _handleMessageFromNative(messageJSON) {
	    _dispatchMessageFromObjC(messageJSON);
	  }

	  messagingIframe = document.createElement('iframe');
	  messagingIframe.style.display = 'none';
	  messagingIframe.src = '';
	  document.documentElement.appendChild(messagingIframe);
	  messageHandlers['_disableJavascriptAlertBoxSafetyTimeout'] = disableJavscriptAlertBoxSafetyTimeout; // registerHandler(
	  //   '_disableJavascriptAlertBoxSafetyTimeout',
	  //   disableJavscriptAlertBoxSafetyTimeout
	  // );
	  // setTimeout(_callWVJBCallbacks, 0);
	  // function _callWVJBCallbacks() {
	  //   var callbacks = window.WVJBCallbacks;
	  //   delete window.WVJBCallbacks;
	  //   for (var i=0; i<callbacks.length; i++) {
	  //     callbacks[i](LanxinJsBridge);
	  //   }
	  // }
	}

	var adaptor = {
	  call: function call(req) {
	    var api = req.api,
	        meta = req.meta,
	        payload = req.payload;
	    return new Promise(function (resolve) {
	      window.LanxinJsBridge.callHandler(api, {
	        meta: meta,
	        payload: payload
	      }, resolve);
	    });
	  },
	  listen: function listen(req) {
	    var api = req.api,
	        callback = req.callback;
	    return window.LanxinJsBridge.registerHandler(api, callback);
	  }
	};

	var androidBridge = {
	  init: bridge$1,
	  call: adaptor.call,
	  listen: adaptor.listen
	};

	// 根据 https://github.com/marcuswestin/WebViewJavascriptBridge
	// 修改项：
	// 1. window.WebViewJavascriptBridge -> window.LanxinJsBridge
	// 2. CUSTOM_PROTOCOL_SCHEME: http -> lx
	// 3. 删除 _callWVJBCallbacks 函数，调用 bridge 之前一定已经初始化
	// 注意： 不要做其他修改，以便之后代码的维护与升级
	function bridge$2() {
	  if (window.LanxinJsBridge) {
	    return;
	  } // if (!window.onerror) {
	  //   window.onerror = function(msg, url, line) {
	  //     console.log('LanxinJsBridge: ERROR:' + msg + '@' + url + ':' + line);
	  //   };
	  // }


	  window.LanxinJsBridge = {
	    registerHandler: registerHandler,
	    callHandler: callHandler,
	    disableJavscriptAlertBoxSafetyTimeout: disableJavscriptAlertBoxSafetyTimeout,
	    _fetchQueue: _fetchQueue,
	    _checkHandler: _checkHandler,
	    _reset: _reset,
	    _handleMessageFromObjC: _handleMessageFromObjC
	  };
	  var messagingIframe;
	  var sendMessageQueue = [];
	  var messageHandlers = {};
	  var CUSTOM_PROTOCOL_SCHEME = 'lx';
	  var QUEUE_HAS_MESSAGE = '__wvjb_queue_message__';
	  var responseCallbacks = {};
	  var uniqueId = 1;
	  var dispatchMessagesWithTimeoutSafety = true;

	  function registerHandler(handlerName, handler) {
	    messageHandlers[handlerName] = handler;
	    callHandler('internal.utils.notifyRegisterAction', {
	      meta: {},
	      payload: {
	        type: 'start',
	        api: handlerName
	      }
	    });
	  }

	  function callHandler(handlerName, data, responseCallback) {
	    if (arguments.length === 2 && typeof data === 'function') {
	      responseCallback = data;
	      data = null;
	    }

	    _doSend({
	      handlerName: handlerName,
	      data: data
	    }, responseCallback);
	  }

	  function disableJavscriptAlertBoxSafetyTimeout() {
	    dispatchMessagesWithTimeoutSafety = false;
	  }

	  function _doSend(message, responseCallback) {
	    if (responseCallback) {
	      uniqueId++;
	      var callbackId = "cb_".concat(uniqueId, "_").concat(new Date().getTime());
	      responseCallbacks[callbackId] = responseCallback;
	      message.callbackId = callbackId;
	    }

	    sendMessageQueue.push(message);
	    messagingIframe.src = "".concat(CUSTOM_PROTOCOL_SCHEME, "://").concat(QUEUE_HAS_MESSAGE);
	  }

	  function _fetchQueue() {
	    var messageQueueString = JSON.stringify(sendMessageQueue);
	    sendMessageQueue = [];
	    return messageQueueString;
	  }

	  function _checkHandler(payload) {
	    payload = JSON.parse(payload);
	    var _payload = payload,
	        handlerName = _payload.handlerName,
	        callbackId = _payload.callbackId;
	    var responseData = {
	      callbackId: callbackId,
	      handlerName: handlerName,
	      result: !!messageHandlers[handlerName]
	    };
	    return JSON.stringify(responseData);
	  }

	  function _reset() {
	    messageHandlers = {};
	    messageHandlers['_disableJavascriptAlertBoxSafetyTimeout'] = disableJavscriptAlertBoxSafetyTimeout; // registerHandler(
	    //   '_disableJavascriptAlertBoxSafetyTimeout',
	    //   disableJavscriptAlertBoxSafetyTimeout
	    // );
	  }

	  function _dispatchMessageFromObjC(messageJSON) {
	    if (dispatchMessagesWithTimeoutSafety) {
	      setTimeout(_doDispatchMessageFromObjC);
	    } else {
	      _doDispatchMessageFromObjC();
	    }

	    function _doDispatchMessageFromObjC() {
	      var message = JSON.parse(messageJSON); // var messageHandler;

	      var responseCallback;

	      if (message.responseId) {
	        responseCallback = responseCallbacks[message.responseId];

	        if (!responseCallback) {
	          return;
	        }

	        responseCallback(message.responseData);
	        delete responseCallbacks[message.responseId];
	      } else {
	        if (message.callbackId) {
	          var callbackResponseId = message.callbackId;

	          responseCallback = function responseCallback(responseData) {
	            _doSend({
	              handlerName: message.handlerName,
	              responseId: callbackResponseId,
	              responseData: responseData
	            });
	          };
	        }

	        var handler = messageHandlers[message.handlerName];

	        if (!handler) {
	          console.log('LanxinJsBridge: WARNING: no handler for message from ObjC:', message);
	        } else {
	          handler(message.data, responseCallback);
	        }
	      }
	    }
	  }

	  function _handleMessageFromObjC(messageJSON) {
	    _dispatchMessageFromObjC(messageJSON);
	  }

	  messagingIframe = document.createElement('iframe');
	  messagingIframe.style.display = 'none';
	  messagingIframe.src = "".concat(CUSTOM_PROTOCOL_SCHEME, "://").concat(QUEUE_HAS_MESSAGE);
	  document.documentElement.appendChild(messagingIframe);
	  messageHandlers['_disableJavascriptAlertBoxSafetyTimeout'] = disableJavscriptAlertBoxSafetyTimeout; // registerHandler(
	  //   '_disableJavascriptAlertBoxSafetyTimeout',
	  //   disableJavscriptAlertBoxSafetyTimeout
	  // );
	  // setTimeout(_callWVJBCallbacks, 0);
	  // function _callWVJBCallbacks() {
	  //   var callbacks = window.WVJBCallbacks;
	  //   delete window.WVJBCallbacks;
	  //   for (var i=0; i<callbacks.length; i++) {
	  //     callbacks[i](LanxinJsBridge);
	  //   }
	  // }
	}

	var adaptor$1 = {
	  call: function call(req) {
	    var api = req.api,
	        meta = req.meta,
	        payload = req.payload;
	    return new Promise(function (resolve) {
	      window.LanxinJsBridge.callHandler(api, {
	        meta: meta,
	        payload: payload
	      }, resolve);
	    });
	  },
	  listen: function listen(req) {
	    var api = req.api,
	        callback = req.callback;
	    return window.LanxinJsBridge.registerHandler(api, callback);
	  }
	};

	var iosBridge = {
	  init: bridge$2,
	  call: adaptor$1.call,
	  listen: adaptor$1.listen
	};

	/**
	 * Mac 端采用IOS Bridge 方案
	 */
	var macBridge = {
	  init: bridge$2,
	  call: adaptor$1.call,
	  listen: adaptor$1.listen
	};

	/**
	 * Windows 端采用IOS Bridge 方案
	 */
	var windowsBridge = {
	  init: bridge$2,
	  call: adaptor$1.call,
	  listen: adaptor$1.listen
	};

	var _bridges;
	var ANDROID = OS_TYPE.ANDROID,
	    IOS = OS_TYPE.IOS,
	    MAC = OS_TYPE.MAC,
	    WINDOWS = OS_TYPE.WINDOWS;
	var bridges = (_bridges = {}, _defineProperty(_bridges, ANDROID, androidBridge), _defineProperty(_bridges, IOS, iosBridge), _defineProperty(_bridges, MAC, macBridge), _defineProperty(_bridges, WINDOWS, windowsBridge), _bridges);

	var BridgeFactory = /*#__PURE__*/function () {
	  function BridgeFactory() {
	    _classCallCheck(this, BridgeFactory);
	  }

	  _createClass(BridgeFactory, null, [{
	    key: "create",
	    value: function () {
	      var _create = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
	        var osType, bridge;
	        return regenerator.wrap(function _callee$(_context) {
	          while (1) {
	            switch (_context.prev = _context.next) {
	              case 0:
	                osType = getOsType();
	                bridge = bridges[osType];

	                if (platform.isLanxinApp) {
	                  _context.next = 4;
	                  break;
	                }

	                throw new Error('Application is not in Lanxin App.');

	              case 4:
	                if (!isUndefined_1(bridge)) {
	                  _context.next = 6;
	                  break;
	                }

	                throw new Error('Can not find appropriate Bridge.');

	              case 6:
	                _context.next = 8;
	                return bridge.init();

	              case 8:
	                return _context.abrupt("return", bridge);

	              case 9:
	              case "end":
	                return _context.stop();
	            }
	          }
	        }, _callee);
	      }));

	      function create() {
	        return _create.apply(this, arguments);
	      }

	      return create;
	    }()
	  }]);

	  return BridgeFactory;
	}();

	var bridge$3 = null; // 注入 mock bridge

	function injectMockBridge(mockBridge) {
	  bridge$3 = mockBridge;
	}

	function createBridge(_x, _x2) {
	  return _createBridge.apply(this, arguments);
	}

	function _createBridge() {
	  _createBridge = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            if (!(bridge$3 === null)) {
	              _context.next = 4;
	              break;
	            }

	            _context.next = 3;
	            return BridgeFactory.create();

	          case 3:
	            bridge$3 = _context.sent;

	          case 4:
	            context.bridge = bridge$3;
	            _context.next = 7;
	            return next();

	          case 7:
	            return _context.abrupt("return", context);

	          case 8:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _createBridge.apply(this, arguments);
	}

	/** Detect free variable `global` from Node.js. */
	var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;

	var _freeGlobal = freeGlobal;

	/** Detect free variable `self`. */
	var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

	/** Used as a reference to the global object. */
	var root = _freeGlobal || freeSelf || Function('return this')();

	var _root = root;

	/** Built-in value references. */
	var Symbol$1 = _root.Symbol;

	var _Symbol = Symbol$1;

	/** Used for built-in method references. */
	var objectProto = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty = objectProto.hasOwnProperty;

	/**
	 * Used to resolve the
	 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	var nativeObjectToString = objectProto.toString;

	/** Built-in value references. */
	var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;

	/**
	 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
	 *
	 * @private
	 * @param {*} value The value to query.
	 * @returns {string} Returns the raw `toStringTag`.
	 */
	function getRawTag(value) {
	  var isOwn = hasOwnProperty.call(value, symToStringTag),
	      tag = value[symToStringTag];

	  try {
	    value[symToStringTag] = undefined;
	    var unmasked = true;
	  } catch (e) {}

	  var result = nativeObjectToString.call(value);
	  if (unmasked) {
	    if (isOwn) {
	      value[symToStringTag] = tag;
	    } else {
	      delete value[symToStringTag];
	    }
	  }
	  return result;
	}

	var _getRawTag = getRawTag;

	/** Used for built-in method references. */
	var objectProto$1 = Object.prototype;

	/**
	 * Used to resolve the
	 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
	 * of values.
	 */
	var nativeObjectToString$1 = objectProto$1.toString;

	/**
	 * Converts `value` to a string using `Object.prototype.toString`.
	 *
	 * @private
	 * @param {*} value The value to convert.
	 * @returns {string} Returns the converted string.
	 */
	function objectToString(value) {
	  return nativeObjectToString$1.call(value);
	}

	var _objectToString = objectToString;

	/** `Object#toString` result references. */
	var nullTag = '[object Null]',
	    undefinedTag = '[object Undefined]';

	/** Built-in value references. */
	var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;

	/**
	 * The base implementation of `getTag` without fallbacks for buggy environments.
	 *
	 * @private
	 * @param {*} value The value to query.
	 * @returns {string} Returns the `toStringTag`.
	 */
	function baseGetTag(value) {
	  if (value == null) {
	    return value === undefined ? undefinedTag : nullTag;
	  }
	  return (symToStringTag$1 && symToStringTag$1 in Object(value))
	    ? _getRawTag(value)
	    : _objectToString(value);
	}

	var _baseGetTag = baseGetTag;

	/**
	 * Checks if `value` is the
	 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
	 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
	 * @example
	 *
	 * _.isObject({});
	 * // => true
	 *
	 * _.isObject([1, 2, 3]);
	 * // => true
	 *
	 * _.isObject(_.noop);
	 * // => true
	 *
	 * _.isObject(null);
	 * // => false
	 */
	function isObject(value) {
	  var type = typeof value;
	  return value != null && (type == 'object' || type == 'function');
	}

	var isObject_1 = isObject;

	/** `Object#toString` result references. */
	var asyncTag = '[object AsyncFunction]',
	    funcTag = '[object Function]',
	    genTag = '[object GeneratorFunction]',
	    proxyTag = '[object Proxy]';

	/**
	 * Checks if `value` is classified as a `Function` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
	 * @example
	 *
	 * _.isFunction(_);
	 * // => true
	 *
	 * _.isFunction(/abc/);
	 * // => false
	 */
	function isFunction(value) {
	  if (!isObject_1(value)) {
	    return false;
	  }
	  // The use of `Object#toString` avoids issues with the `typeof` operator
	  // in Safari 9 which returns 'object' for typed arrays and other constructors.
	  var tag = _baseGetTag(value);
	  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
	}

	var isFunction_1 = isFunction;

	function call(_x, _x2) {
	  return _call.apply(this, arguments);
	}

	function _call() {
	  _call = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    var apiMeta, req, _ref, success, fail, complete, res, status, data, callbackType;

	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            apiMeta = context.apiMeta, req = context.req; // let callback = null;

	            if (!(apiMeta.type === 'call')) {
	              _context.next = 16;
	              break;
	            }

	            _ref = req || {}, success = _ref.success, fail = _ref.fail, complete = _ref.complete;
	            context.req = {};
	            context.req.api = apiMeta.name;
	            context.req.payload = _objectSpread({}, req);
	            _context.next = 8;
	            return next();

	          case 8:
	            res = context.res;
	            status = res.status, data = res.data;
	            callbackType = CALLBACK_TYPE.PROMISE;

	            if (!isUndefined_1(complete) && isFunction_1(complete)) {
	              complete(data, status);
	              callbackType = CALLBACK_TYPE.CALLBACK;
	            }

	            if (status && status.code === 0) {
	              if (!isUndefined_1(success) && isFunction_1(success)) {
	                success(data);
	                callbackType = CALLBACK_TYPE.CALLBACK;
	              }
	            } else if (!isUndefined_1(fail) && isFunction_1(fail)) {
	              fail(status);
	              callbackType = CALLBACK_TYPE.CALLBACK;
	            }

	            context.res.callbackType = callbackType;
	            _context.next = 18;
	            break;

	          case 16:
	            _context.next = 18;
	            return next();

	          case 18:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _call.apply(this, arguments);
	}

	function listen(_x, _x2) {
	  return _listen.apply(this, arguments);
	}

	function _listen() {
	  _listen = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    var apiMeta, req, callback;
	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            apiMeta = context.apiMeta, req = context.req;
	            callback = null;

	            if (apiMeta.type === 'listen') {
	              callback = req;
	              context.req = {};
	              context.req.api = apiMeta.name;
	              context.req.callback = callback;
	            }

	            _context.next = 5;
	            return next();

	          case 5:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _listen.apply(this, arguments);
	}

	var _typeof_1 = createCommonjsModule(function (module) {
	function _typeof(obj) {
	  "@babel/helpers - typeof";

	  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
	    module.exports = _typeof = function _typeof(obj) {
	      return typeof obj;
	    };

	    module.exports["default"] = module.exports, module.exports.__esModule = true;
	  } else {
	    module.exports = _typeof = function _typeof(obj) {
	      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
	    };

	    module.exports["default"] = module.exports, module.exports.__esModule = true;
	  }

	  return _typeof(obj);
	}

	module.exports = _typeof;
	module.exports["default"] = module.exports, module.exports.__esModule = true;
	});

	var _typeof = /*@__PURE__*/getDefaultExportFromCjs(_typeof_1);

	/** Used for built-in method references. */
	var objectProto$2 = Object.prototype;

	/**
	 * Checks if `value` is likely a prototype object.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
	 */
	function isPrototype(value) {
	  var Ctor = value && value.constructor,
	      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$2;

	  return value === proto;
	}

	var _isPrototype = isPrototype;

	/**
	 * Creates a unary function that invokes `func` with its argument transformed.
	 *
	 * @private
	 * @param {Function} func The function to wrap.
	 * @param {Function} transform The argument transform.
	 * @returns {Function} Returns the new function.
	 */
	function overArg(func, transform) {
	  return function(arg) {
	    return func(transform(arg));
	  };
	}

	var _overArg = overArg;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeKeys = _overArg(Object.keys, Object);

	var _nativeKeys = nativeKeys;

	/** Used for built-in method references. */
	var objectProto$3 = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$1 = objectProto$3.hasOwnProperty;

	/**
	 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 */
	function baseKeys(object) {
	  if (!_isPrototype(object)) {
	    return _nativeKeys(object);
	  }
	  var result = [];
	  for (var key in Object(object)) {
	    if (hasOwnProperty$1.call(object, key) && key != 'constructor') {
	      result.push(key);
	    }
	  }
	  return result;
	}

	var _baseKeys = baseKeys;

	/** Used to detect overreaching core-js shims. */
	var coreJsData = _root['__core-js_shared__'];

	var _coreJsData = coreJsData;

	/** Used to detect methods masquerading as native. */
	var maskSrcKey = (function() {
	  var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
	  return uid ? ('Symbol(src)_1.' + uid) : '';
	}());

	/**
	 * Checks if `func` has its source masked.
	 *
	 * @private
	 * @param {Function} func The function to check.
	 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
	 */
	function isMasked(func) {
	  return !!maskSrcKey && (maskSrcKey in func);
	}

	var _isMasked = isMasked;

	/** Used for built-in method references. */
	var funcProto = Function.prototype;

	/** Used to resolve the decompiled source of functions. */
	var funcToString = funcProto.toString;

	/**
	 * Converts `func` to its source code.
	 *
	 * @private
	 * @param {Function} func The function to convert.
	 * @returns {string} Returns the source code.
	 */
	function toSource(func) {
	  if (func != null) {
	    try {
	      return funcToString.call(func);
	    } catch (e) {}
	    try {
	      return (func + '');
	    } catch (e) {}
	  }
	  return '';
	}

	var _toSource = toSource;

	/**
	 * Used to match `RegExp`
	 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
	 */
	var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

	/** Used to detect host constructors (Safari). */
	var reIsHostCtor = /^\[object .+?Constructor\]$/;

	/** Used for built-in method references. */
	var funcProto$1 = Function.prototype,
	    objectProto$4 = Object.prototype;

	/** Used to resolve the decompiled source of functions. */
	var funcToString$1 = funcProto$1.toString;

	/** Used to check objects for own properties. */
	var hasOwnProperty$2 = objectProto$4.hasOwnProperty;

	/** Used to detect if a method is native. */
	var reIsNative = RegExp('^' +
	  funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
	  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
	);

	/**
	 * The base implementation of `_.isNative` without bad shim checks.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a native function,
	 *  else `false`.
	 */
	function baseIsNative(value) {
	  if (!isObject_1(value) || _isMasked(value)) {
	    return false;
	  }
	  var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
	  return pattern.test(_toSource(value));
	}

	var _baseIsNative = baseIsNative;

	/**
	 * Gets the value at `key` of `object`.
	 *
	 * @private
	 * @param {Object} [object] The object to query.
	 * @param {string} key The key of the property to get.
	 * @returns {*} Returns the property value.
	 */
	function getValue(object, key) {
	  return object == null ? undefined : object[key];
	}

	var _getValue = getValue;

	/**
	 * Gets the native function at `key` of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @param {string} key The key of the method to get.
	 * @returns {*} Returns the function if it's native, else `undefined`.
	 */
	function getNative(object, key) {
	  var value = _getValue(object, key);
	  return _baseIsNative(value) ? value : undefined;
	}

	var _getNative = getNative;

	/* Built-in method references that are verified to be native. */
	var DataView = _getNative(_root, 'DataView');

	var _DataView = DataView;

	/* Built-in method references that are verified to be native. */
	var Map = _getNative(_root, 'Map');

	var _Map = Map;

	/* Built-in method references that are verified to be native. */
	var Promise$1 = _getNative(_root, 'Promise');

	var _Promise = Promise$1;

	/* Built-in method references that are verified to be native. */
	var Set = _getNative(_root, 'Set');

	var _Set = Set;

	/* Built-in method references that are verified to be native. */
	var WeakMap = _getNative(_root, 'WeakMap');

	var _WeakMap = WeakMap;

	/** `Object#toString` result references. */
	var mapTag = '[object Map]',
	    objectTag = '[object Object]',
	    promiseTag = '[object Promise]',
	    setTag = '[object Set]',
	    weakMapTag = '[object WeakMap]';

	var dataViewTag = '[object DataView]';

	/** Used to detect maps, sets, and weakmaps. */
	var dataViewCtorString = _toSource(_DataView),
	    mapCtorString = _toSource(_Map),
	    promiseCtorString = _toSource(_Promise),
	    setCtorString = _toSource(_Set),
	    weakMapCtorString = _toSource(_WeakMap);

	/**
	 * Gets the `toStringTag` of `value`.
	 *
	 * @private
	 * @param {*} value The value to query.
	 * @returns {string} Returns the `toStringTag`.
	 */
	var getTag = _baseGetTag;

	// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
	if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
	    (_Map && getTag(new _Map) != mapTag) ||
	    (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
	    (_Set && getTag(new _Set) != setTag) ||
	    (_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
	  getTag = function(value) {
	    var result = _baseGetTag(value),
	        Ctor = result == objectTag ? value.constructor : undefined,
	        ctorString = Ctor ? _toSource(Ctor) : '';

	    if (ctorString) {
	      switch (ctorString) {
	        case dataViewCtorString: return dataViewTag;
	        case mapCtorString: return mapTag;
	        case promiseCtorString: return promiseTag;
	        case setCtorString: return setTag;
	        case weakMapCtorString: return weakMapTag;
	      }
	    }
	    return result;
	  };
	}

	var _getTag = getTag;

	/**
	 * Checks if `value` is object-like. A value is object-like if it's not `null`
	 * and has a `typeof` result of "object".
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
	 * @example
	 *
	 * _.isObjectLike({});
	 * // => true
	 *
	 * _.isObjectLike([1, 2, 3]);
	 * // => true
	 *
	 * _.isObjectLike(_.noop);
	 * // => false
	 *
	 * _.isObjectLike(null);
	 * // => false
	 */
	function isObjectLike(value) {
	  return value != null && typeof value == 'object';
	}

	var isObjectLike_1 = isObjectLike;

	/** `Object#toString` result references. */
	var argsTag = '[object Arguments]';

	/**
	 * The base implementation of `_.isArguments`.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
	 */
	function baseIsArguments(value) {
	  return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
	}

	var _baseIsArguments = baseIsArguments;

	/** Used for built-in method references. */
	var objectProto$5 = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$3 = objectProto$5.hasOwnProperty;

	/** Built-in value references. */
	var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;

	/**
	 * Checks if `value` is likely an `arguments` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
	 *  else `false`.
	 * @example
	 *
	 * _.isArguments(function() { return arguments; }());
	 * // => true
	 *
	 * _.isArguments([1, 2, 3]);
	 * // => false
	 */
	var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
	  return isObjectLike_1(value) && hasOwnProperty$3.call(value, 'callee') &&
	    !propertyIsEnumerable.call(value, 'callee');
	};

	var isArguments_1 = isArguments;

	/**
	 * Checks if `value` is classified as an `Array` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
	 * @example
	 *
	 * _.isArray([1, 2, 3]);
	 * // => true
	 *
	 * _.isArray(document.body.children);
	 * // => false
	 *
	 * _.isArray('abc');
	 * // => false
	 *
	 * _.isArray(_.noop);
	 * // => false
	 */
	var isArray = Array.isArray;

	var isArray_1 = isArray;

	/** Used as references for various `Number` constants. */
	var MAX_SAFE_INTEGER = 9007199254740991;

	/**
	 * Checks if `value` is a valid array-like length.
	 *
	 * **Note:** This method is loosely based on
	 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
	 * @example
	 *
	 * _.isLength(3);
	 * // => true
	 *
	 * _.isLength(Number.MIN_VALUE);
	 * // => false
	 *
	 * _.isLength(Infinity);
	 * // => false
	 *
	 * _.isLength('3');
	 * // => false
	 */
	function isLength(value) {
	  return typeof value == 'number' &&
	    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	}

	var isLength_1 = isLength;

	/**
	 * Checks if `value` is array-like. A value is considered array-like if it's
	 * not a function and has a `value.length` that's an integer greater than or
	 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
	 * @example
	 *
	 * _.isArrayLike([1, 2, 3]);
	 * // => true
	 *
	 * _.isArrayLike(document.body.children);
	 * // => true
	 *
	 * _.isArrayLike('abc');
	 * // => true
	 *
	 * _.isArrayLike(_.noop);
	 * // => false
	 */
	function isArrayLike(value) {
	  return value != null && isLength_1(value.length) && !isFunction_1(value);
	}

	var isArrayLike_1 = isArrayLike;

	/**
	 * This method returns `false`.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.13.0
	 * @category Util
	 * @returns {boolean} Returns `false`.
	 * @example
	 *
	 * _.times(2, _.stubFalse);
	 * // => [false, false]
	 */
	function stubFalse() {
	  return false;
	}

	var stubFalse_1 = stubFalse;

	var isBuffer_1 = createCommonjsModule(function (module, exports) {
	/** Detect free variable `exports`. */
	var freeExports =  exports && !exports.nodeType && exports;

	/** Detect free variable `module`. */
	var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;

	/** Detect the popular CommonJS extension `module.exports`. */
	var moduleExports = freeModule && freeModule.exports === freeExports;

	/** Built-in value references. */
	var Buffer = moduleExports ? _root.Buffer : undefined;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

	/**
	 * Checks if `value` is a buffer.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.3.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
	 * @example
	 *
	 * _.isBuffer(new Buffer(2));
	 * // => true
	 *
	 * _.isBuffer(new Uint8Array(2));
	 * // => false
	 */
	var isBuffer = nativeIsBuffer || stubFalse_1;

	module.exports = isBuffer;
	});

	/** `Object#toString` result references. */
	var argsTag$1 = '[object Arguments]',
	    arrayTag = '[object Array]',
	    boolTag = '[object Boolean]',
	    dateTag = '[object Date]',
	    errorTag = '[object Error]',
	    funcTag$1 = '[object Function]',
	    mapTag$1 = '[object Map]',
	    numberTag = '[object Number]',
	    objectTag$1 = '[object Object]',
	    regexpTag = '[object RegExp]',
	    setTag$1 = '[object Set]',
	    stringTag = '[object String]',
	    weakMapTag$1 = '[object WeakMap]';

	var arrayBufferTag = '[object ArrayBuffer]',
	    dataViewTag$1 = '[object DataView]',
	    float32Tag = '[object Float32Array]',
	    float64Tag = '[object Float64Array]',
	    int8Tag = '[object Int8Array]',
	    int16Tag = '[object Int16Array]',
	    int32Tag = '[object Int32Array]',
	    uint8Tag = '[object Uint8Array]',
	    uint8ClampedTag = '[object Uint8ClampedArray]',
	    uint16Tag = '[object Uint16Array]',
	    uint32Tag = '[object Uint32Array]';

	/** Used to identify `toStringTag` values of typed arrays. */
	var typedArrayTags = {};
	typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
	typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
	typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
	typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
	typedArrayTags[uint32Tag] = true;
	typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
	typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
	typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
	typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
	typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
	typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] =
	typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
	typedArrayTags[weakMapTag$1] = false;

	/**
	 * The base implementation of `_.isTypedArray` without Node.js optimizations.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
	 */
	function baseIsTypedArray(value) {
	  return isObjectLike_1(value) &&
	    isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
	}

	var _baseIsTypedArray = baseIsTypedArray;

	/**
	 * The base implementation of `_.unary` without support for storing metadata.
	 *
	 * @private
	 * @param {Function} func The function to cap arguments for.
	 * @returns {Function} Returns the new capped function.
	 */
	function baseUnary(func) {
	  return function(value) {
	    return func(value);
	  };
	}

	var _baseUnary = baseUnary;

	var _nodeUtil = createCommonjsModule(function (module, exports) {
	/** Detect free variable `exports`. */
	var freeExports =  exports && !exports.nodeType && exports;

	/** Detect free variable `module`. */
	var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;

	/** Detect the popular CommonJS extension `module.exports`. */
	var moduleExports = freeModule && freeModule.exports === freeExports;

	/** Detect free variable `process` from Node.js. */
	var freeProcess = moduleExports && _freeGlobal.process;

	/** Used to access faster Node.js helpers. */
	var nodeUtil = (function() {
	  try {
	    // Use `util.types` for Node.js 10+.
	    var types = freeModule && freeModule.require && freeModule.require('util').types;

	    if (types) {
	      return types;
	    }

	    // Legacy `process.binding('util')` for Node.js < 10.
	    return freeProcess && freeProcess.binding && freeProcess.binding('util');
	  } catch (e) {}
	}());

	module.exports = nodeUtil;
	});

	/* Node.js helper references. */
	var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;

	/**
	 * Checks if `value` is classified as a typed array.
	 *
	 * @static
	 * @memberOf _
	 * @since 3.0.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
	 * @example
	 *
	 * _.isTypedArray(new Uint8Array);
	 * // => true
	 *
	 * _.isTypedArray([]);
	 * // => false
	 */
	var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;

	var isTypedArray_1 = isTypedArray;

	/** `Object#toString` result references. */
	var mapTag$2 = '[object Map]',
	    setTag$2 = '[object Set]';

	/** Used for built-in method references. */
	var objectProto$6 = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$4 = objectProto$6.hasOwnProperty;

	/**
	 * Checks if `value` is an empty object, collection, map, or set.
	 *
	 * Objects are considered empty if they have no own enumerable string keyed
	 * properties.
	 *
	 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
	 * jQuery-like collections are considered empty if they have a `length` of `0`.
	 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.1.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
	 * @example
	 *
	 * _.isEmpty(null);
	 * // => true
	 *
	 * _.isEmpty(true);
	 * // => true
	 *
	 * _.isEmpty(1);
	 * // => true
	 *
	 * _.isEmpty([1, 2, 3]);
	 * // => false
	 *
	 * _.isEmpty({ 'a': 1 });
	 * // => false
	 */
	function isEmpty(value) {
	  if (value == null) {
	    return true;
	  }
	  if (isArrayLike_1(value) &&
	      (isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
	        isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
	    return !value.length;
	  }
	  var tag = _getTag(value);
	  if (tag == mapTag$2 || tag == setTag$2) {
	    return !value.size;
	  }
	  if (_isPrototype(value)) {
	    return !_baseKeys(value).length;
	  }
	  for (var key in value) {
	    if (hasOwnProperty$4.call(value, key)) {
	      return false;
	    }
	  }
	  return true;
	}

	var isEmpty_1 = isEmpty;

	/** Built-in value references. */
	var getPrototype = _overArg(Object.getPrototypeOf, Object);

	var _getPrototype = getPrototype;

	/** `Object#toString` result references. */
	var objectTag$2 = '[object Object]';

	/** Used for built-in method references. */
	var funcProto$2 = Function.prototype,
	    objectProto$7 = Object.prototype;

	/** Used to resolve the decompiled source of functions. */
	var funcToString$2 = funcProto$2.toString;

	/** Used to check objects for own properties. */
	var hasOwnProperty$5 = objectProto$7.hasOwnProperty;

	/** Used to infer the `Object` constructor. */
	var objectCtorString = funcToString$2.call(Object);

	/**
	 * Checks if `value` is a plain object, that is, an object created by the
	 * `Object` constructor or one with a `[[Prototype]]` of `null`.
	 *
	 * @static
	 * @memberOf _
	 * @since 0.8.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
	 * @example
	 *
	 * function Foo() {
	 *   this.a = 1;
	 * }
	 *
	 * _.isPlainObject(new Foo);
	 * // => false
	 *
	 * _.isPlainObject([1, 2, 3]);
	 * // => false
	 *
	 * _.isPlainObject({ 'x': 0, 'y': 0 });
	 * // => true
	 *
	 * _.isPlainObject(Object.create(null));
	 * // => true
	 */
	function isPlainObject(value) {
	  if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$2) {
	    return false;
	  }
	  var proto = _getPrototype(value);
	  if (proto === null) {
	    return true;
	  }
	  var Ctor = hasOwnProperty$5.call(proto, 'constructor') && proto.constructor;
	  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
	    funcToString$2.call(Ctor) == objectCtorString;
	}

	var isPlainObject_1 = isPlainObject;

	function generateValidator(payload) {
	  var validatorOptions = {
	    type: [],
	    required: false,
	    validator: undefined,
	    default: undefined
	  }; // 根据payload组装验证器

	  if (isArray_1(payload) || isFunction_1(payload)) {
	    validatorOptions.type = [].concat(payload);
	  }

	  if (isPlainObject_1(payload)) {
	    Object.assign(validatorOptions, payload);
	    validatorOptions.type = [].concat(validatorOptions.type);
	  }

	  return validatorOptions;
	}

	var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; // 类型维护验证

	function assertType(value, type) {
	  var valid = false;
	  var expectedType = getType(type);

	  if (simpleCheckRE.test(expectedType)) {
	    var t = _typeof(value);

	    valid = t === expectedType.toLowerCase(); // for primitive wrapper objects

	    if (!valid && t === 'object') {
	      valid = value instanceof type;
	    }
	  } else if (expectedType === 'Object') {
	    valid = isPlainObject_1(value);
	  } else if (expectedType === 'Array') {
	    valid = isArray_1(value);
	  } else {
	    valid = value instanceof type;
	  }

	  return {
	    valid: valid,
	    expectedType: expectedType
	  };
	} // 获取类型


	function getType(fn) {
	  var match = fn && fn.toString().match(/^\s*function (\w+)/);
	  return match ? match[1] : '';
	} // 获取原始类型


	function getRawType(value) {
	  return Object.prototype.toString.call(value).slice(8, -1);
	}

	function validatePayload(_x, _x2) {
	  return _validatePayload.apply(this, arguments);
	}

	function _validatePayload() {
	  _validatePayload = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    var apiMeta, req, payloadOptions, payload, name, payloadMeta, value, validatorOptions, type, valid, expectedTypes, i, assertedType;
	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            apiMeta = context.apiMeta, req = context.req;
	            payloadOptions = apiMeta.payload;
	            payload = req.payload;

	            if (!payloadOptions) {
	              _context.next = 26;
	              break;
	            }

	            _context.t0 = regenerator.keys(payloadOptions);

	          case 5:
	            if ((_context.t1 = _context.t0()).done) {
	              _context.next = 26;
	              break;
	            }

	            name = _context.t1.value;
	            payloadMeta = payloadOptions[name];
	            value = payload[name];
	            validatorOptions = generateValidator(payloadMeta); // 组装default值

	            if (isUndefined_1(value) && !isUndefined_1(validatorOptions.default)) {
	              value = payload[name] = validatorOptions.default;
	            } // 使用验证器进行参数校验


	            if (!validatorOptions.required) {
	              _context.next = 14;
	              break;
	            }

	            if (!(typeof value !== 'number' && typeof value !== 'boolean' && isEmpty_1(value))) {
	              _context.next = 14;
	              break;
	            }

	            throw new Error("Missing required payload: \"".concat(name, "\"."));

	          case 14:
	            if (isUndefined_1(value)) {
	              _context.next = 24;
	              break;
	            }

	            if (!(isFunction_1(validatorOptions.validator) && !validatorOptions.validator(value))) {
	              _context.next = 17;
	              break;
	            }

	            throw new Error("Invalid payload: validator check failed for payload: \"".concat(name, "\"."));

	          case 17:
	            if (!(validatorOptions.type.length > 0)) {
	              _context.next = 24;
	              break;
	            }

	            type = validatorOptions.type;
	            valid = false;
	            expectedTypes = [];

	            for (i = 0; i < type.length && !valid; i++) {
	              assertedType = assertType(value, type[i]);
	              expectedTypes.push(assertedType.expectedType || '');
	              valid = assertedType.valid;
	            }

	            if (valid) {
	              _context.next = 24;
	              break;
	            }

	            throw new Error("".concat("Invalid payload: type check failed for payload \"".concat(name, "\".") + " Expected ".concat(expectedTypes.join(', ')) + ", got ".concat(getRawType(value), ". \n")).concat(JSON.stringify(req, null, 2)));

	          case 24:
	            _context.next = 5;
	            break;

	          case 26:
	            _context.next = 28;
	            return next();

	          case 28:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _validatePayload.apply(this, arguments);
	}

	/**
	 * Removes all key-value entries from the list cache.
	 *
	 * @private
	 * @name clear
	 * @memberOf ListCache
	 */
	function listCacheClear() {
	  this.__data__ = [];
	  this.size = 0;
	}

	var _listCacheClear = listCacheClear;

	/**
	 * Performs a
	 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
	 * comparison between two values to determine if they are equivalent.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.0.0
	 * @category Lang
	 * @param {*} value The value to compare.
	 * @param {*} other The other value to compare.
	 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
	 * @example
	 *
	 * var object = { 'a': 1 };
	 * var other = { 'a': 1 };
	 *
	 * _.eq(object, object);
	 * // => true
	 *
	 * _.eq(object, other);
	 * // => false
	 *
	 * _.eq('a', 'a');
	 * // => true
	 *
	 * _.eq('a', Object('a'));
	 * // => false
	 *
	 * _.eq(NaN, NaN);
	 * // => true
	 */
	function eq(value, other) {
	  return value === other || (value !== value && other !== other);
	}

	var eq_1 = eq;

	/**
	 * Gets the index at which the `key` is found in `array` of key-value pairs.
	 *
	 * @private
	 * @param {Array} array The array to inspect.
	 * @param {*} key The key to search for.
	 * @returns {number} Returns the index of the matched value, else `-1`.
	 */
	function assocIndexOf(array, key) {
	  var length = array.length;
	  while (length--) {
	    if (eq_1(array[length][0], key)) {
	      return length;
	    }
	  }
	  return -1;
	}

	var _assocIndexOf = assocIndexOf;

	/** Used for built-in method references. */
	var arrayProto = Array.prototype;

	/** Built-in value references. */
	var splice = arrayProto.splice;

	/**
	 * Removes `key` and its value from the list cache.
	 *
	 * @private
	 * @name delete
	 * @memberOf ListCache
	 * @param {string} key The key of the value to remove.
	 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
	 */
	function listCacheDelete(key) {
	  var data = this.__data__,
	      index = _assocIndexOf(data, key);

	  if (index < 0) {
	    return false;
	  }
	  var lastIndex = data.length - 1;
	  if (index == lastIndex) {
	    data.pop();
	  } else {
	    splice.call(data, index, 1);
	  }
	  --this.size;
	  return true;
	}

	var _listCacheDelete = listCacheDelete;

	/**
	 * Gets the list cache value for `key`.
	 *
	 * @private
	 * @name get
	 * @memberOf ListCache
	 * @param {string} key The key of the value to get.
	 * @returns {*} Returns the entry value.
	 */
	function listCacheGet(key) {
	  var data = this.__data__,
	      index = _assocIndexOf(data, key);

	  return index < 0 ? undefined : data[index][1];
	}

	var _listCacheGet = listCacheGet;

	/**
	 * Checks if a list cache value for `key` exists.
	 *
	 * @private
	 * @name has
	 * @memberOf ListCache
	 * @param {string} key The key of the entry to check.
	 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	 */
	function listCacheHas(key) {
	  return _assocIndexOf(this.__data__, key) > -1;
	}

	var _listCacheHas = listCacheHas;

	/**
	 * Sets the list cache `key` to `value`.
	 *
	 * @private
	 * @name set
	 * @memberOf ListCache
	 * @param {string} key The key of the value to set.
	 * @param {*} value The value to set.
	 * @returns {Object} Returns the list cache instance.
	 */
	function listCacheSet(key, value) {
	  var data = this.__data__,
	      index = _assocIndexOf(data, key);

	  if (index < 0) {
	    ++this.size;
	    data.push([key, value]);
	  } else {
	    data[index][1] = value;
	  }
	  return this;
	}

	var _listCacheSet = listCacheSet;

	/**
	 * Creates an list cache object.
	 *
	 * @private
	 * @constructor
	 * @param {Array} [entries] The key-value pairs to cache.
	 */
	function ListCache(entries) {
	  var index = -1,
	      length = entries == null ? 0 : entries.length;

	  this.clear();
	  while (++index < length) {
	    var entry = entries[index];
	    this.set(entry[0], entry[1]);
	  }
	}

	// Add methods to `ListCache`.
	ListCache.prototype.clear = _listCacheClear;
	ListCache.prototype['delete'] = _listCacheDelete;
	ListCache.prototype.get = _listCacheGet;
	ListCache.prototype.has = _listCacheHas;
	ListCache.prototype.set = _listCacheSet;

	var _ListCache = ListCache;

	/**
	 * Removes all key-value entries from the stack.
	 *
	 * @private
	 * @name clear
	 * @memberOf Stack
	 */
	function stackClear() {
	  this.__data__ = new _ListCache;
	  this.size = 0;
	}

	var _stackClear = stackClear;

	/**
	 * Removes `key` and its value from the stack.
	 *
	 * @private
	 * @name delete
	 * @memberOf Stack
	 * @param {string} key The key of the value to remove.
	 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
	 */
	function stackDelete(key) {
	  var data = this.__data__,
	      result = data['delete'](key);

	  this.size = data.size;
	  return result;
	}

	var _stackDelete = stackDelete;

	/**
	 * Gets the stack value for `key`.
	 *
	 * @private
	 * @name get
	 * @memberOf Stack
	 * @param {string} key The key of the value to get.
	 * @returns {*} Returns the entry value.
	 */
	function stackGet(key) {
	  return this.__data__.get(key);
	}

	var _stackGet = stackGet;

	/**
	 * Checks if a stack value for `key` exists.
	 *
	 * @private
	 * @name has
	 * @memberOf Stack
	 * @param {string} key The key of the entry to check.
	 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	 */
	function stackHas(key) {
	  return this.__data__.has(key);
	}

	var _stackHas = stackHas;

	/* Built-in method references that are verified to be native. */
	var nativeCreate = _getNative(Object, 'create');

	var _nativeCreate = nativeCreate;

	/**
	 * Removes all key-value entries from the hash.
	 *
	 * @private
	 * @name clear
	 * @memberOf Hash
	 */
	function hashClear() {
	  this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
	  this.size = 0;
	}

	var _hashClear = hashClear;

	/**
	 * Removes `key` and its value from the hash.
	 *
	 * @private
	 * @name delete
	 * @memberOf Hash
	 * @param {Object} hash The hash to modify.
	 * @param {string} key The key of the value to remove.
	 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
	 */
	function hashDelete(key) {
	  var result = this.has(key) && delete this.__data__[key];
	  this.size -= result ? 1 : 0;
	  return result;
	}

	var _hashDelete = hashDelete;

	/** Used to stand-in for `undefined` hash values. */
	var HASH_UNDEFINED = '__lodash_hash_undefined__';

	/** Used for built-in method references. */
	var objectProto$8 = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$6 = objectProto$8.hasOwnProperty;

	/**
	 * Gets the hash value for `key`.
	 *
	 * @private
	 * @name get
	 * @memberOf Hash
	 * @param {string} key The key of the value to get.
	 * @returns {*} Returns the entry value.
	 */
	function hashGet(key) {
	  var data = this.__data__;
	  if (_nativeCreate) {
	    var result = data[key];
	    return result === HASH_UNDEFINED ? undefined : result;
	  }
	  return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
	}

	var _hashGet = hashGet;

	/** Used for built-in method references. */
	var objectProto$9 = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$7 = objectProto$9.hasOwnProperty;

	/**
	 * Checks if a hash value for `key` exists.
	 *
	 * @private
	 * @name has
	 * @memberOf Hash
	 * @param {string} key The key of the entry to check.
	 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	 */
	function hashHas(key) {
	  var data = this.__data__;
	  return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$7.call(data, key);
	}

	var _hashHas = hashHas;

	/** Used to stand-in for `undefined` hash values. */
	var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';

	/**
	 * Sets the hash `key` to `value`.
	 *
	 * @private
	 * @name set
	 * @memberOf Hash
	 * @param {string} key The key of the value to set.
	 * @param {*} value The value to set.
	 * @returns {Object} Returns the hash instance.
	 */
	function hashSet(key, value) {
	  var data = this.__data__;
	  this.size += this.has(key) ? 0 : 1;
	  data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
	  return this;
	}

	var _hashSet = hashSet;

	/**
	 * Creates a hash object.
	 *
	 * @private
	 * @constructor
	 * @param {Array} [entries] The key-value pairs to cache.
	 */
	function Hash(entries) {
	  var index = -1,
	      length = entries == null ? 0 : entries.length;

	  this.clear();
	  while (++index < length) {
	    var entry = entries[index];
	    this.set(entry[0], entry[1]);
	  }
	}

	// Add methods to `Hash`.
	Hash.prototype.clear = _hashClear;
	Hash.prototype['delete'] = _hashDelete;
	Hash.prototype.get = _hashGet;
	Hash.prototype.has = _hashHas;
	Hash.prototype.set = _hashSet;

	var _Hash = Hash;

	/**
	 * Removes all key-value entries from the map.
	 *
	 * @private
	 * @name clear
	 * @memberOf MapCache
	 */
	function mapCacheClear() {
	  this.size = 0;
	  this.__data__ = {
	    'hash': new _Hash,
	    'map': new (_Map || _ListCache),
	    'string': new _Hash
	  };
	}

	var _mapCacheClear = mapCacheClear;

	/**
	 * Checks if `value` is suitable for use as unique object key.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
	 */
	function isKeyable(value) {
	  var type = typeof value;
	  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
	    ? (value !== '__proto__')
	    : (value === null);
	}

	var _isKeyable = isKeyable;

	/**
	 * Gets the data for `map`.
	 *
	 * @private
	 * @param {Object} map The map to query.
	 * @param {string} key The reference key.
	 * @returns {*} Returns the map data.
	 */
	function getMapData(map, key) {
	  var data = map.__data__;
	  return _isKeyable(key)
	    ? data[typeof key == 'string' ? 'string' : 'hash']
	    : data.map;
	}

	var _getMapData = getMapData;

	/**
	 * Removes `key` and its value from the map.
	 *
	 * @private
	 * @name delete
	 * @memberOf MapCache
	 * @param {string} key The key of the value to remove.
	 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
	 */
	function mapCacheDelete(key) {
	  var result = _getMapData(this, key)['delete'](key);
	  this.size -= result ? 1 : 0;
	  return result;
	}

	var _mapCacheDelete = mapCacheDelete;

	/**
	 * Gets the map value for `key`.
	 *
	 * @private
	 * @name get
	 * @memberOf MapCache
	 * @param {string} key The key of the value to get.
	 * @returns {*} Returns the entry value.
	 */
	function mapCacheGet(key) {
	  return _getMapData(this, key).get(key);
	}

	var _mapCacheGet = mapCacheGet;

	/**
	 * Checks if a map value for `key` exists.
	 *
	 * @private
	 * @name has
	 * @memberOf MapCache
	 * @param {string} key The key of the entry to check.
	 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
	 */
	function mapCacheHas(key) {
	  return _getMapData(this, key).has(key);
	}

	var _mapCacheHas = mapCacheHas;

	/**
	 * Sets the map `key` to `value`.
	 *
	 * @private
	 * @name set
	 * @memberOf MapCache
	 * @param {string} key The key of the value to set.
	 * @param {*} value The value to set.
	 * @returns {Object} Returns the map cache instance.
	 */
	function mapCacheSet(key, value) {
	  var data = _getMapData(this, key),
	      size = data.size;

	  data.set(key, value);
	  this.size += data.size == size ? 0 : 1;
	  return this;
	}

	var _mapCacheSet = mapCacheSet;

	/**
	 * Creates a map cache object to store key-value pairs.
	 *
	 * @private
	 * @constructor
	 * @param {Array} [entries] The key-value pairs to cache.
	 */
	function MapCache(entries) {
	  var index = -1,
	      length = entries == null ? 0 : entries.length;

	  this.clear();
	  while (++index < length) {
	    var entry = entries[index];
	    this.set(entry[0], entry[1]);
	  }
	}

	// Add methods to `MapCache`.
	MapCache.prototype.clear = _mapCacheClear;
	MapCache.prototype['delete'] = _mapCacheDelete;
	MapCache.prototype.get = _mapCacheGet;
	MapCache.prototype.has = _mapCacheHas;
	MapCache.prototype.set = _mapCacheSet;

	var _MapCache = MapCache;

	/** Used as the size to enable large array optimizations. */
	var LARGE_ARRAY_SIZE = 200;

	/**
	 * Sets the stack `key` to `value`.
	 *
	 * @private
	 * @name set
	 * @memberOf Stack
	 * @param {string} key The key of the value to set.
	 * @param {*} value The value to set.
	 * @returns {Object} Returns the stack cache instance.
	 */
	function stackSet(key, value) {
	  var data = this.__data__;
	  if (data instanceof _ListCache) {
	    var pairs = data.__data__;
	    if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
	      pairs.push([key, value]);
	      this.size = ++data.size;
	      return this;
	    }
	    data = this.__data__ = new _MapCache(pairs);
	  }
	  data.set(key, value);
	  this.size = data.size;
	  return this;
	}

	var _stackSet = stackSet;

	/**
	 * Creates a stack cache object to store key-value pairs.
	 *
	 * @private
	 * @constructor
	 * @param {Array} [entries] The key-value pairs to cache.
	 */
	function Stack(entries) {
	  var data = this.__data__ = new _ListCache(entries);
	  this.size = data.size;
	}

	// Add methods to `Stack`.
	Stack.prototype.clear = _stackClear;
	Stack.prototype['delete'] = _stackDelete;
	Stack.prototype.get = _stackGet;
	Stack.prototype.has = _stackHas;
	Stack.prototype.set = _stackSet;

	var _Stack = Stack;

	/**
	 * A specialized version of `_.forEach` for arrays without support for
	 * iteratee shorthands.
	 *
	 * @private
	 * @param {Array} [array] The array to iterate over.
	 * @param {Function} iteratee The function invoked per iteration.
	 * @returns {Array} Returns `array`.
	 */
	function arrayEach(array, iteratee) {
	  var index = -1,
	      length = array == null ? 0 : array.length;

	  while (++index < length) {
	    if (iteratee(array[index], index, array) === false) {
	      break;
	    }
	  }
	  return array;
	}

	var _arrayEach = arrayEach;

	var defineProperty$1 = (function() {
	  try {
	    var func = _getNative(Object, 'defineProperty');
	    func({}, '', {});
	    return func;
	  } catch (e) {}
	}());

	var _defineProperty$1 = defineProperty$1;

	/**
	 * The base implementation of `assignValue` and `assignMergeValue` without
	 * value checks.
	 *
	 * @private
	 * @param {Object} object The object to modify.
	 * @param {string} key The key of the property to assign.
	 * @param {*} value The value to assign.
	 */
	function baseAssignValue(object, key, value) {
	  if (key == '__proto__' && _defineProperty$1) {
	    _defineProperty$1(object, key, {
	      'configurable': true,
	      'enumerable': true,
	      'value': value,
	      'writable': true
	    });
	  } else {
	    object[key] = value;
	  }
	}

	var _baseAssignValue = baseAssignValue;

	/** Used for built-in method references. */
	var objectProto$a = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$8 = objectProto$a.hasOwnProperty;

	/**
	 * Assigns `value` to `key` of `object` if the existing value is not equivalent
	 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
	 * for equality comparisons.
	 *
	 * @private
	 * @param {Object} object The object to modify.
	 * @param {string} key The key of the property to assign.
	 * @param {*} value The value to assign.
	 */
	function assignValue(object, key, value) {
	  var objValue = object[key];
	  if (!(hasOwnProperty$8.call(object, key) && eq_1(objValue, value)) ||
	      (value === undefined && !(key in object))) {
	    _baseAssignValue(object, key, value);
	  }
	}

	var _assignValue = assignValue;

	/**
	 * Copies properties of `source` to `object`.
	 *
	 * @private
	 * @param {Object} source The object to copy properties from.
	 * @param {Array} props The property identifiers to copy.
	 * @param {Object} [object={}] The object to copy properties to.
	 * @param {Function} [customizer] The function to customize copied values.
	 * @returns {Object} Returns `object`.
	 */
	function copyObject(source, props, object, customizer) {
	  var isNew = !object;
	  object || (object = {});

	  var index = -1,
	      length = props.length;

	  while (++index < length) {
	    var key = props[index];

	    var newValue = customizer
	      ? customizer(object[key], source[key], key, object, source)
	      : undefined;

	    if (newValue === undefined) {
	      newValue = source[key];
	    }
	    if (isNew) {
	      _baseAssignValue(object, key, newValue);
	    } else {
	      _assignValue(object, key, newValue);
	    }
	  }
	  return object;
	}

	var _copyObject = copyObject;

	/**
	 * The base implementation of `_.times` without support for iteratee shorthands
	 * or max array length checks.
	 *
	 * @private
	 * @param {number} n The number of times to invoke `iteratee`.
	 * @param {Function} iteratee The function invoked per iteration.
	 * @returns {Array} Returns the array of results.
	 */
	function baseTimes(n, iteratee) {
	  var index = -1,
	      result = Array(n);

	  while (++index < n) {
	    result[index] = iteratee(index);
	  }
	  return result;
	}

	var _baseTimes = baseTimes;

	/** Used as references for various `Number` constants. */
	var MAX_SAFE_INTEGER$1 = 9007199254740991;

	/** Used to detect unsigned integer values. */
	var reIsUint = /^(?:0|[1-9]\d*)$/;

	/**
	 * Checks if `value` is a valid array-like index.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
	 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
	 */
	function isIndex(value, length) {
	  var type = typeof value;
	  length = length == null ? MAX_SAFE_INTEGER$1 : length;

	  return !!length &&
	    (type == 'number' ||
	      (type != 'symbol' && reIsUint.test(value))) &&
	        (value > -1 && value % 1 == 0 && value < length);
	}

	var _isIndex = isIndex;

	/** Used for built-in method references. */
	var objectProto$b = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$9 = objectProto$b.hasOwnProperty;

	/**
	 * Creates an array of the enumerable property names of the array-like `value`.
	 *
	 * @private
	 * @param {*} value The value to query.
	 * @param {boolean} inherited Specify returning inherited property names.
	 * @returns {Array} Returns the array of property names.
	 */
	function arrayLikeKeys(value, inherited) {
	  var isArr = isArray_1(value),
	      isArg = !isArr && isArguments_1(value),
	      isBuff = !isArr && !isArg && isBuffer_1(value),
	      isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
	      skipIndexes = isArr || isArg || isBuff || isType,
	      result = skipIndexes ? _baseTimes(value.length, String) : [],
	      length = result.length;

	  for (var key in value) {
	    if ((inherited || hasOwnProperty$9.call(value, key)) &&
	        !(skipIndexes && (
	           // Safari 9 has enumerable `arguments.length` in strict mode.
	           key == 'length' ||
	           // Node.js 0.10 has enumerable non-index properties on buffers.
	           (isBuff && (key == 'offset' || key == 'parent')) ||
	           // PhantomJS 2 has enumerable non-index properties on typed arrays.
	           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
	           // Skip index properties.
	           _isIndex(key, length)
	        ))) {
	      result.push(key);
	    }
	  }
	  return result;
	}

	var _arrayLikeKeys = arrayLikeKeys;

	/**
	 * Creates an array of the own enumerable property names of `object`.
	 *
	 * **Note:** Non-object values are coerced to objects. See the
	 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
	 * for more details.
	 *
	 * @static
	 * @since 0.1.0
	 * @memberOf _
	 * @category Object
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 * @example
	 *
	 * function Foo() {
	 *   this.a = 1;
	 *   this.b = 2;
	 * }
	 *
	 * Foo.prototype.c = 3;
	 *
	 * _.keys(new Foo);
	 * // => ['a', 'b'] (iteration order is not guaranteed)
	 *
	 * _.keys('hi');
	 * // => ['0', '1']
	 */
	function keys(object) {
	  return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
	}

	var keys_1 = keys;

	/**
	 * The base implementation of `_.assign` without support for multiple sources
	 * or `customizer` functions.
	 *
	 * @private
	 * @param {Object} object The destination object.
	 * @param {Object} source The source object.
	 * @returns {Object} Returns `object`.
	 */
	function baseAssign(object, source) {
	  return object && _copyObject(source, keys_1(source), object);
	}

	var _baseAssign = baseAssign;

	/**
	 * This function is like
	 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
	 * except that it includes inherited enumerable properties.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 */
	function nativeKeysIn(object) {
	  var result = [];
	  if (object != null) {
	    for (var key in Object(object)) {
	      result.push(key);
	    }
	  }
	  return result;
	}

	var _nativeKeysIn = nativeKeysIn;

	/** Used for built-in method references. */
	var objectProto$c = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$a = objectProto$c.hasOwnProperty;

	/**
	 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 */
	function baseKeysIn(object) {
	  if (!isObject_1(object)) {
	    return _nativeKeysIn(object);
	  }
	  var isProto = _isPrototype(object),
	      result = [];

	  for (var key in object) {
	    if (!(key == 'constructor' && (isProto || !hasOwnProperty$a.call(object, key)))) {
	      result.push(key);
	    }
	  }
	  return result;
	}

	var _baseKeysIn = baseKeysIn;

	/**
	 * Creates an array of the own and inherited enumerable property names of `object`.
	 *
	 * **Note:** Non-object values are coerced to objects.
	 *
	 * @static
	 * @memberOf _
	 * @since 3.0.0
	 * @category Object
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names.
	 * @example
	 *
	 * function Foo() {
	 *   this.a = 1;
	 *   this.b = 2;
	 * }
	 *
	 * Foo.prototype.c = 3;
	 *
	 * _.keysIn(new Foo);
	 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
	 */
	function keysIn(object) {
	  return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
	}

	var keysIn_1 = keysIn;

	/**
	 * The base implementation of `_.assignIn` without support for multiple sources
	 * or `customizer` functions.
	 *
	 * @private
	 * @param {Object} object The destination object.
	 * @param {Object} source The source object.
	 * @returns {Object} Returns `object`.
	 */
	function baseAssignIn(object, source) {
	  return object && _copyObject(source, keysIn_1(source), object);
	}

	var _baseAssignIn = baseAssignIn;

	var _cloneBuffer = createCommonjsModule(function (module, exports) {
	/** Detect free variable `exports`. */
	var freeExports =  exports && !exports.nodeType && exports;

	/** Detect free variable `module`. */
	var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;

	/** Detect the popular CommonJS extension `module.exports`. */
	var moduleExports = freeModule && freeModule.exports === freeExports;

	/** Built-in value references. */
	var Buffer = moduleExports ? _root.Buffer : undefined,
	    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;

	/**
	 * Creates a clone of  `buffer`.
	 *
	 * @private
	 * @param {Buffer} buffer The buffer to clone.
	 * @param {boolean} [isDeep] Specify a deep clone.
	 * @returns {Buffer} Returns the cloned buffer.
	 */
	function cloneBuffer(buffer, isDeep) {
	  if (isDeep) {
	    return buffer.slice();
	  }
	  var length = buffer.length,
	      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);

	  buffer.copy(result);
	  return result;
	}

	module.exports = cloneBuffer;
	});

	/**
	 * Copies the values of `source` to `array`.
	 *
	 * @private
	 * @param {Array} source The array to copy values from.
	 * @param {Array} [array=[]] The array to copy values to.
	 * @returns {Array} Returns `array`.
	 */
	function copyArray(source, array) {
	  var index = -1,
	      length = source.length;

	  array || (array = Array(length));
	  while (++index < length) {
	    array[index] = source[index];
	  }
	  return array;
	}

	var _copyArray = copyArray;

	/**
	 * A specialized version of `_.filter` for arrays without support for
	 * iteratee shorthands.
	 *
	 * @private
	 * @param {Array} [array] The array to iterate over.
	 * @param {Function} predicate The function invoked per iteration.
	 * @returns {Array} Returns the new filtered array.
	 */
	function arrayFilter(array, predicate) {
	  var index = -1,
	      length = array == null ? 0 : array.length,
	      resIndex = 0,
	      result = [];

	  while (++index < length) {
	    var value = array[index];
	    if (predicate(value, index, array)) {
	      result[resIndex++] = value;
	    }
	  }
	  return result;
	}

	var _arrayFilter = arrayFilter;

	/**
	 * This method returns a new empty array.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.13.0
	 * @category Util
	 * @returns {Array} Returns the new empty array.
	 * @example
	 *
	 * var arrays = _.times(2, _.stubArray);
	 *
	 * console.log(arrays);
	 * // => [[], []]
	 *
	 * console.log(arrays[0] === arrays[1]);
	 * // => false
	 */
	function stubArray() {
	  return [];
	}

	var stubArray_1 = stubArray;

	/** Used for built-in method references. */
	var objectProto$d = Object.prototype;

	/** Built-in value references. */
	var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeGetSymbols = Object.getOwnPropertySymbols;

	/**
	 * Creates an array of the own enumerable symbols of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of symbols.
	 */
	var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
	  if (object == null) {
	    return [];
	  }
	  object = Object(object);
	  return _arrayFilter(nativeGetSymbols(object), function(symbol) {
	    return propertyIsEnumerable$1.call(object, symbol);
	  });
	};

	var _getSymbols = getSymbols;

	/**
	 * Copies own symbols of `source` to `object`.
	 *
	 * @private
	 * @param {Object} source The object to copy symbols from.
	 * @param {Object} [object={}] The object to copy symbols to.
	 * @returns {Object} Returns `object`.
	 */
	function copySymbols(source, object) {
	  return _copyObject(source, _getSymbols(source), object);
	}

	var _copySymbols = copySymbols;

	/**
	 * Appends the elements of `values` to `array`.
	 *
	 * @private
	 * @param {Array} array The array to modify.
	 * @param {Array} values The values to append.
	 * @returns {Array} Returns `array`.
	 */
	function arrayPush(array, values) {
	  var index = -1,
	      length = values.length,
	      offset = array.length;

	  while (++index < length) {
	    array[offset + index] = values[index];
	  }
	  return array;
	}

	var _arrayPush = arrayPush;

	/* Built-in method references for those with the same name as other `lodash` methods. */
	var nativeGetSymbols$1 = Object.getOwnPropertySymbols;

	/**
	 * Creates an array of the own and inherited enumerable symbols of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of symbols.
	 */
	var getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function(object) {
	  var result = [];
	  while (object) {
	    _arrayPush(result, _getSymbols(object));
	    object = _getPrototype(object);
	  }
	  return result;
	};

	var _getSymbolsIn = getSymbolsIn;

	/**
	 * Copies own and inherited symbols of `source` to `object`.
	 *
	 * @private
	 * @param {Object} source The object to copy symbols from.
	 * @param {Object} [object={}] The object to copy symbols to.
	 * @returns {Object} Returns `object`.
	 */
	function copySymbolsIn(source, object) {
	  return _copyObject(source, _getSymbolsIn(source), object);
	}

	var _copySymbolsIn = copySymbolsIn;

	/**
	 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
	 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
	 * symbols of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @param {Function} keysFunc The function to get the keys of `object`.
	 * @param {Function} symbolsFunc The function to get the symbols of `object`.
	 * @returns {Array} Returns the array of property names and symbols.
	 */
	function baseGetAllKeys(object, keysFunc, symbolsFunc) {
	  var result = keysFunc(object);
	  return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
	}

	var _baseGetAllKeys = baseGetAllKeys;

	/**
	 * Creates an array of own enumerable property names and symbols of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names and symbols.
	 */
	function getAllKeys(object) {
	  return _baseGetAllKeys(object, keys_1, _getSymbols);
	}

	var _getAllKeys = getAllKeys;

	/**
	 * Creates an array of own and inherited enumerable property names and
	 * symbols of `object`.
	 *
	 * @private
	 * @param {Object} object The object to query.
	 * @returns {Array} Returns the array of property names and symbols.
	 */
	function getAllKeysIn(object) {
	  return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn);
	}

	var _getAllKeysIn = getAllKeysIn;

	/** Used for built-in method references. */
	var objectProto$e = Object.prototype;

	/** Used to check objects for own properties. */
	var hasOwnProperty$b = objectProto$e.hasOwnProperty;

	/**
	 * Initializes an array clone.
	 *
	 * @private
	 * @param {Array} array The array to clone.
	 * @returns {Array} Returns the initialized clone.
	 */
	function initCloneArray(array) {
	  var length = array.length,
	      result = new array.constructor(length);

	  // Add properties assigned by `RegExp#exec`.
	  if (length && typeof array[0] == 'string' && hasOwnProperty$b.call(array, 'index')) {
	    result.index = array.index;
	    result.input = array.input;
	  }
	  return result;
	}

	var _initCloneArray = initCloneArray;

	/** Built-in value references. */
	var Uint8Array = _root.Uint8Array;

	var _Uint8Array = Uint8Array;

	/**
	 * Creates a clone of `arrayBuffer`.
	 *
	 * @private
	 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
	 * @returns {ArrayBuffer} Returns the cloned array buffer.
	 */
	function cloneArrayBuffer(arrayBuffer) {
	  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
	  new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
	  return result;
	}

	var _cloneArrayBuffer = cloneArrayBuffer;

	/**
	 * Creates a clone of `dataView`.
	 *
	 * @private
	 * @param {Object} dataView The data view to clone.
	 * @param {boolean} [isDeep] Specify a deep clone.
	 * @returns {Object} Returns the cloned data view.
	 */
	function cloneDataView(dataView, isDeep) {
	  var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer;
	  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
	}

	var _cloneDataView = cloneDataView;

	/** Used to match `RegExp` flags from their coerced string values. */
	var reFlags = /\w*$/;

	/**
	 * Creates a clone of `regexp`.
	 *
	 * @private
	 * @param {Object} regexp The regexp to clone.
	 * @returns {Object} Returns the cloned regexp.
	 */
	function cloneRegExp(regexp) {
	  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
	  result.lastIndex = regexp.lastIndex;
	  return result;
	}

	var _cloneRegExp = cloneRegExp;

	/** Used to convert symbols to primitives and strings. */
	var symbolProto = _Symbol ? _Symbol.prototype : undefined,
	    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

	/**
	 * Creates a clone of the `symbol` object.
	 *
	 * @private
	 * @param {Object} symbol The symbol object to clone.
	 * @returns {Object} Returns the cloned symbol object.
	 */
	function cloneSymbol(symbol) {
	  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
	}

	var _cloneSymbol = cloneSymbol;

	/**
	 * Creates a clone of `typedArray`.
	 *
	 * @private
	 * @param {Object} typedArray The typed array to clone.
	 * @param {boolean} [isDeep] Specify a deep clone.
	 * @returns {Object} Returns the cloned typed array.
	 */
	function cloneTypedArray(typedArray, isDeep) {
	  var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
	  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
	}

	var _cloneTypedArray = cloneTypedArray;

	/** `Object#toString` result references. */
	var boolTag$1 = '[object Boolean]',
	    dateTag$1 = '[object Date]',
	    mapTag$3 = '[object Map]',
	    numberTag$1 = '[object Number]',
	    regexpTag$1 = '[object RegExp]',
	    setTag$3 = '[object Set]',
	    stringTag$1 = '[object String]',
	    symbolTag = '[object Symbol]';

	var arrayBufferTag$1 = '[object ArrayBuffer]',
	    dataViewTag$2 = '[object DataView]',
	    float32Tag$1 = '[object Float32Array]',
	    float64Tag$1 = '[object Float64Array]',
	    int8Tag$1 = '[object Int8Array]',
	    int16Tag$1 = '[object Int16Array]',
	    int32Tag$1 = '[object Int32Array]',
	    uint8Tag$1 = '[object Uint8Array]',
	    uint8ClampedTag$1 = '[object Uint8ClampedArray]',
	    uint16Tag$1 = '[object Uint16Array]',
	    uint32Tag$1 = '[object Uint32Array]';

	/**
	 * Initializes an object clone based on its `toStringTag`.
	 *
	 * **Note:** This function only supports cloning values with tags of
	 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
	 *
	 * @private
	 * @param {Object} object The object to clone.
	 * @param {string} tag The `toStringTag` of the object to clone.
	 * @param {boolean} [isDeep] Specify a deep clone.
	 * @returns {Object} Returns the initialized clone.
	 */
	function initCloneByTag(object, tag, isDeep) {
	  var Ctor = object.constructor;
	  switch (tag) {
	    case arrayBufferTag$1:
	      return _cloneArrayBuffer(object);

	    case boolTag$1:
	    case dateTag$1:
	      return new Ctor(+object);

	    case dataViewTag$2:
	      return _cloneDataView(object, isDeep);

	    case float32Tag$1: case float64Tag$1:
	    case int8Tag$1: case int16Tag$1: case int32Tag$1:
	    case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
	      return _cloneTypedArray(object, isDeep);

	    case mapTag$3:
	      return new Ctor;

	    case numberTag$1:
	    case stringTag$1:
	      return new Ctor(object);

	    case regexpTag$1:
	      return _cloneRegExp(object);

	    case setTag$3:
	      return new Ctor;

	    case symbolTag:
	      return _cloneSymbol(object);
	  }
	}

	var _initCloneByTag = initCloneByTag;

	/** Built-in value references. */
	var objectCreate = Object.create;

	/**
	 * The base implementation of `_.create` without support for assigning
	 * properties to the created object.
	 *
	 * @private
	 * @param {Object} proto The object to inherit from.
	 * @returns {Object} Returns the new object.
	 */
	var baseCreate = (function() {
	  function object() {}
	  return function(proto) {
	    if (!isObject_1(proto)) {
	      return {};
	    }
	    if (objectCreate) {
	      return objectCreate(proto);
	    }
	    object.prototype = proto;
	    var result = new object;
	    object.prototype = undefined;
	    return result;
	  };
	}());

	var _baseCreate = baseCreate;

	/**
	 * Initializes an object clone.
	 *
	 * @private
	 * @param {Object} object The object to clone.
	 * @returns {Object} Returns the initialized clone.
	 */
	function initCloneObject(object) {
	  return (typeof object.constructor == 'function' && !_isPrototype(object))
	    ? _baseCreate(_getPrototype(object))
	    : {};
	}

	var _initCloneObject = initCloneObject;

	/** `Object#toString` result references. */
	var mapTag$4 = '[object Map]';

	/**
	 * The base implementation of `_.isMap` without Node.js optimizations.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
	 */
	function baseIsMap(value) {
	  return isObjectLike_1(value) && _getTag(value) == mapTag$4;
	}

	var _baseIsMap = baseIsMap;

	/* Node.js helper references. */
	var nodeIsMap = _nodeUtil && _nodeUtil.isMap;

	/**
	 * Checks if `value` is classified as a `Map` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.3.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
	 * @example
	 *
	 * _.isMap(new Map);
	 * // => true
	 *
	 * _.isMap(new WeakMap);
	 * // => false
	 */
	var isMap = nodeIsMap ? _baseUnary(nodeIsMap) : _baseIsMap;

	var isMap_1 = isMap;

	/** `Object#toString` result references. */
	var setTag$4 = '[object Set]';

	/**
	 * The base implementation of `_.isSet` without Node.js optimizations.
	 *
	 * @private
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
	 */
	function baseIsSet(value) {
	  return isObjectLike_1(value) && _getTag(value) == setTag$4;
	}

	var _baseIsSet = baseIsSet;

	/* Node.js helper references. */
	var nodeIsSet = _nodeUtil && _nodeUtil.isSet;

	/**
	 * Checks if `value` is classified as a `Set` object.
	 *
	 * @static
	 * @memberOf _
	 * @since 4.3.0
	 * @category Lang
	 * @param {*} value The value to check.
	 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
	 * @example
	 *
	 * _.isSet(new Set);
	 * // => true
	 *
	 * _.isSet(new WeakSet);
	 * // => false
	 */
	var isSet = nodeIsSet ? _baseUnary(nodeIsSet) : _baseIsSet;

	var isSet_1 = isSet;

	/** Used to compose bitmasks for cloning. */
	var CLONE_DEEP_FLAG = 1,
	    CLONE_FLAT_FLAG = 2,
	    CLONE_SYMBOLS_FLAG = 4;

	/** `Object#toString` result references. */
	var argsTag$2 = '[object Arguments]',
	    arrayTag$1 = '[object Array]',
	    boolTag$2 = '[object Boolean]',
	    dateTag$2 = '[object Date]',
	    errorTag$1 = '[object Error]',
	    funcTag$2 = '[object Function]',
	    genTag$1 = '[object GeneratorFunction]',
	    mapTag$5 = '[object Map]',
	    numberTag$2 = '[object Number]',
	    objectTag$3 = '[object Object]',
	    regexpTag$2 = '[object RegExp]',
	    setTag$5 = '[object Set]',
	    stringTag$2 = '[object String]',
	    symbolTag$1 = '[object Symbol]',
	    weakMapTag$2 = '[object WeakMap]';

	var arrayBufferTag$2 = '[object ArrayBuffer]',
	    dataViewTag$3 = '[object DataView]',
	    float32Tag$2 = '[object Float32Array]',
	    float64Tag$2 = '[object Float64Array]',
	    int8Tag$2 = '[object Int8Array]',
	    int16Tag$2 = '[object Int16Array]',
	    int32Tag$2 = '[object Int32Array]',
	    uint8Tag$2 = '[object Uint8Array]',
	    uint8ClampedTag$2 = '[object Uint8ClampedArray]',
	    uint16Tag$2 = '[object Uint16Array]',
	    uint32Tag$2 = '[object Uint32Array]';

	/** Used to identify `toStringTag` values supported by `_.clone`. */
	var cloneableTags = {};
	cloneableTags[argsTag$2] = cloneableTags[arrayTag$1] =
	cloneableTags[arrayBufferTag$2] = cloneableTags[dataViewTag$3] =
	cloneableTags[boolTag$2] = cloneableTags[dateTag$2] =
	cloneableTags[float32Tag$2] = cloneableTags[float64Tag$2] =
	cloneableTags[int8Tag$2] = cloneableTags[int16Tag$2] =
	cloneableTags[int32Tag$2] = cloneableTags[mapTag$5] =
	cloneableTags[numberTag$2] = cloneableTags[objectTag$3] =
	cloneableTags[regexpTag$2] = cloneableTags[setTag$5] =
	cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] =
	cloneableTags[uint8Tag$2] = cloneableTags[uint8ClampedTag$2] =
	cloneableTags[uint16Tag$2] = cloneableTags[uint32Tag$2] = true;
	cloneableTags[errorTag$1] = cloneableTags[funcTag$2] =
	cloneableTags[weakMapTag$2] = false;

	/**
	 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
	 * traversed objects.
	 *
	 * @private
	 * @param {*} value The value to clone.
	 * @param {boolean} bitmask The bitmask flags.
	 *  1 - Deep clone
	 *  2 - Flatten inherited properties
	 *  4 - Clone symbols
	 * @param {Function} [customizer] The function to customize cloning.
	 * @param {string} [key] The key of `value`.
	 * @param {Object} [object] The parent object of `value`.
	 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
	 * @returns {*} Returns the cloned value.
	 */
	function baseClone(value, bitmask, customizer, key, object, stack) {
	  var result,
	      isDeep = bitmask & CLONE_DEEP_FLAG,
	      isFlat = bitmask & CLONE_FLAT_FLAG,
	      isFull = bitmask & CLONE_SYMBOLS_FLAG;

	  if (customizer) {
	    result = object ? customizer(value, key, object, stack) : customizer(value);
	  }
	  if (result !== undefined) {
	    return result;
	  }
	  if (!isObject_1(value)) {
	    return value;
	  }
	  var isArr = isArray_1(value);
	  if (isArr) {
	    result = _initCloneArray(value);
	    if (!isDeep) {
	      return _copyArray(value, result);
	    }
	  } else {
	    var tag = _getTag(value),
	        isFunc = tag == funcTag$2 || tag == genTag$1;

	    if (isBuffer_1(value)) {
	      return _cloneBuffer(value, isDeep);
	    }
	    if (tag == objectTag$3 || tag == argsTag$2 || (isFunc && !object)) {
	      result = (isFlat || isFunc) ? {} : _initCloneObject(value);
	      if (!isDeep) {
	        return isFlat
	          ? _copySymbolsIn(value, _baseAssignIn(result, value))
	          : _copySymbols(value, _baseAssign(result, value));
	      }
	    } else {
	      if (!cloneableTags[tag]) {
	        return object ? value : {};
	      }
	      result = _initCloneByTag(value, tag, isDeep);
	    }
	  }
	  // Check for circular references and return its corresponding clone.
	  stack || (stack = new _Stack);
	  var stacked = stack.get(value);
	  if (stacked) {
	    return stacked;
	  }
	  stack.set(value, result);

	  if (isSet_1(value)) {
	    value.forEach(function(subValue) {
	      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
	    });
	  } else if (isMap_1(value)) {
	    value.forEach(function(subValue, key) {
	      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
	    });
	  }

	  var keysFunc = isFull
	    ? (isFlat ? _getAllKeysIn : _getAllKeys)
	    : (isFlat ? keysIn_1 : keys_1);

	  var props = isArr ? undefined : keysFunc(value);
	  _arrayEach(props || value, function(subValue, key) {
	    if (props) {
	      key = subValue;
	      subValue = value[key];
	    }
	    // Recursively populate clone (susceptible to call stack limits).
	    _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
	  });
	  return result;
	}

	var _baseClone = baseClone;

	/** Used to compose bitmasks for cloning. */
	var CLONE_DEEP_FLAG$1 = 1,
	    CLONE_SYMBOLS_FLAG$1 = 4;

	/**
	 * This method is like `_.clone` except that it recursively clones `value`.
	 *
	 * @static
	 * @memberOf _
	 * @since 1.0.0
	 * @category Lang
	 * @param {*} value The value to recursively clone.
	 * @returns {*} Returns the deep cloned value.
	 * @see _.clone
	 * @example
	 *
	 * var objects = [{ 'a': 1 }, { 'b': 2 }];
	 *
	 * var deep = _.cloneDeep(objects);
	 * console.log(deep[0] === objects[0]);
	 * // => false
	 */
	function cloneDeep(value) {
	  return _baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
	}

	var cloneDeep_1 = cloneDeep;

	function transformStatusCode(_x, _x2) {
	  return _transformStatusCode.apply(this, arguments);
	}

	function _transformStatusCode() {
	  _transformStatusCode = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    var apiMeta, res, code, group;
	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            apiMeta = context.apiMeta;

	            if (!(apiMeta.type === 'call')) {
	              _context.next = 11;
	              break;
	            }

	            _context.next = 4;
	            return next();

	          case 4:
	            // 深拷贝，切断引用之间的关联
	            context.res = cloneDeep_1(context.res);
	            res = context.res;
	            code = res.status.code;
	            group = apiMeta.name.split('.').shift();

	            if (code > 0 && !isUndefined_1(GROUP_CODE[group])) {
	              res.status.code = code + GROUP_CODE[group];
	            }

	            _context.next = 13;
	            break;

	          case 11:
	            _context.next = 13;
	            return next();

	          case 13:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _transformStatusCode.apply(this, arguments);
	}

	function bridgeCall(_x, _x2) {
	  return _bridgeCall.apply(this, arguments);
	}

	function _bridgeCall() {
	  _bridgeCall = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, next) {
	    var bridge, req;
	    return regenerator.wrap(function _callee$(_context) {
	      while (1) {
	        switch (_context.prev = _context.next) {
	          case 0:
	            if (!(context.apiMeta.type === 'call')) {
	              _context.next = 5;
	              break;
	            }

	            bridge = context.bridge, req = context.req;
	            _context.next = 4;
	            return bridge.call(req);

	          case 4:
	            context.res = _context.sent;

	          case 5:
	            _context.next = 7;
	            return next();

	          case 7:
	          case "end":
	            return _context.stop();
	        }
	      }
	    }, _callee);
	  }));
	  return _bridgeCall.apply(this, arguments);
	}

	function bridgeListen(_x, _x2) {
	  return _bridgeListen.apply(this, arguments);
	}

	function _bridgeListen() {
	  _bridgeListen = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(context, next) {
	    var apiMeta, bridge, req, api, callback, resCallback;
	    return regenerator.wrap(function _callee2$(_context2) {
	      while (1) {
	        switch (_context2.prev = _context2.next) {
	          case 0:
	            apiMeta = context.apiMeta, bridge = context.bridge, req = context.req;

	            if (apiMeta.type === 'listen' || isFunction_1(req.payload.trigger)) {
	              api = req.api, callback = req.callback;

	              if (apiMeta.type !== 'listen' && isFunction_1(req.payload.trigger)) {
	                api = apiMeta.triggerName;
	                callback = req.payload.trigger;
	              } // 拆解端内通知并回调状态


	              resCallback = /*#__PURE__*/function () {
	                var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(request, responseCallback) {
	                  var payload, _request$meta, meta, result;

	                  return regenerator.wrap(function _callee$(_context) {
	                    while (1) {
	                      switch (_context.prev = _context.next) {
	                        case 0:
	                          payload = request.payload, _request$meta = request.meta, meta = _request$meta === void 0 ? {} : _request$meta;
	                          _context.t0 = callback;

	                          if (!_context.t0) {
	                            _context.next = 6;
	                            break;
	                          }

	                          _context.next = 5;
	                          return callback(payload);

	                        case 5:
	                          _context.t0 = _context.sent;

	                        case 6:
	                          result = _context.t0;
	                          responseCallback({
	                            status: {
	                              code: 0,
	                              message: 'OK'
	                            },
	                            meta: meta,
	                            data: {
	                              result: result
	                            }
	                          });

	                        case 8:
	                        case "end":
	                          return _context.stop();
	                      }
	                    }
	                  }, _callee);
	                }));

	                return function resCallback(_x3, _x4) {
	                  return _ref.apply(this, arguments);
	                };
	              }();

	              bridge.listen({
	                api: api,
	                callback: resCallback
	              });
	            }

	            _context2.next = 4;
	            return next();

	          case 4:
	          case "end":
	            return _context2.stop();
	        }
	      }
	    }, _callee2);
	  }));
	  return _bridgeListen.apply(this, arguments);
	}

	function bridgeInit() {
	  // 必须保证 createBridge 在最开始，bridgeCall 和 bridgeListen 在最后
	  bridge.use(createBridge); // 组装request、处理response

	  bridge.use(listen);
	  bridge.use(call); // 判断当前JSAPI是否在当前端的版本支持
	  // bridge.use(checkVersion);
	  // 校验payload参数

	  bridge.use(validatePayload); // 将私有状态码转换成公有状态码

	  bridge.use(transformStatusCode); // 调用bridge

	  bridge.use(bridgeListen);
	  bridge.use(bridgeCall);
	}

	function generateApi(ApiConfigList) {
	  var jsApi = {};
	  ApiConfigList.forEach(function (apiMeta) {
	    var name = apiMeta.name;
	    var properties = name.split('.');
	    properties.reduce(function (object, property, index, array) {
	      if (index === array.length - 1) {
	        if (!isFunction_1(object[property])) {
	          object[property] = bridge.proxy.bind(null, apiMeta);
	        } else {
	          throw new Error("function \"".concat(property, "\" alread existed."));
	        }
	      } else if (!isPlainObject_1(object[property])) {
	        object[property] = {};
	      }

	      return object[property];
	    }, jsApi);
	  });
	  return jsApi;
	}

	var domain;

	// This constructor is used to store event handlers. Instantiating this is
	// faster than explicitly calling `Object.create(null)` to get a "clean" empty
	// object (tested with v8 v4.9).
	function EventHandlers() {}
	EventHandlers.prototype = Object.create(null);

	function EventEmitter() {
	  EventEmitter.init.call(this);
	}

	// nodejs oddity
	// require('events') === require('events').EventEmitter
	EventEmitter.EventEmitter = EventEmitter;

	EventEmitter.usingDomains = false;

	EventEmitter.prototype.domain = undefined;
	EventEmitter.prototype._events = undefined;
	EventEmitter.prototype._maxListeners = undefined;

	// By default EventEmitters will print a warning if more than 10 listeners are
	// added to it. This is a useful default which helps finding memory leaks.
	EventEmitter.defaultMaxListeners = 10;

	EventEmitter.init = function() {
	  this.domain = null;
	  if (EventEmitter.usingDomains) {
	    // if there is an active domain, then attach to it.
	    if (domain.active ) ;
	  }

	  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
	    this._events = new EventHandlers();
	    this._eventsCount = 0;
	  }

	  this._maxListeners = this._maxListeners || undefined;
	};

	// Obviously not all Emitters should be limited to 10. This function allows
	// that to be increased. Set to zero for unlimited.
	EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
	  if (typeof n !== 'number' || n < 0 || isNaN(n))
	    throw new TypeError('"n" argument must be a positive number');
	  this._maxListeners = n;
	  return this;
	};

	function $getMaxListeners(that) {
	  if (that._maxListeners === undefined)
	    return EventEmitter.defaultMaxListeners;
	  return that._maxListeners;
	}

	EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
	  return $getMaxListeners(this);
	};

	// These standalone emit* functions are used to optimize calling of event
	// handlers for fast cases because emit() itself often has a variable number of
	// arguments and can be deoptimized because of that. These functions always have
	// the same number of arguments and thus do not get deoptimized, so the code
	// inside them can execute faster.
	function emitNone(handler, isFn, self) {
	  if (isFn)
	    handler.call(self);
	  else {
	    var len = handler.length;
	    var listeners = arrayClone(handler, len);
	    for (var i = 0; i < len; ++i)
	      listeners[i].call(self);
	  }
	}
	function emitOne(handler, isFn, self, arg1) {
	  if (isFn)
	    handler.call(self, arg1);
	  else {
	    var len = handler.length;
	    var listeners = arrayClone(handler, len);
	    for (var i = 0; i < len; ++i)
	      listeners[i].call(self, arg1);
	  }
	}
	function emitTwo(handler, isFn, self, arg1, arg2) {
	  if (isFn)
	    handler.call(self, arg1, arg2);
	  else {
	    var len = handler.length;
	    var listeners = arrayClone(handler, len);
	    for (var i = 0; i < len; ++i)
	      listeners[i].call(self, arg1, arg2);
	  }
	}
	function emitThree(handler, isFn, self, arg1, arg2, arg3) {
	  if (isFn)
	    handler.call(self, arg1, arg2, arg3);
	  else {
	    var len = handler.length;
	    var listeners = arrayClone(handler, len);
	    for (var i = 0; i < len; ++i)
	      listeners[i].call(self, arg1, arg2, arg3);
	  }
	}

	function emitMany(handler, isFn, self, args) {
	  if (isFn)
	    handler.apply(self, args);
	  else {
	    var len = handler.length;
	    var listeners = arrayClone(handler, len);
	    for (var i = 0; i < len; ++i)
	      listeners[i].apply(self, args);
	  }
	}

	EventEmitter.prototype.emit = function emit(type) {
	  var er, handler, len, args, i, events, domain;
	  var doError = (type === 'error');

	  events = this._events;
	  if (events)
	    doError = (doError && events.error == null);
	  else if (!doError)
	    return false;

	  domain = this.domain;

	  // If there is no 'error' event listener then throw.
	  if (doError) {
	    er = arguments[1];
	    if (domain) {
	      if (!er)
	        er = new Error('Uncaught, unspecified "error" event');
	      er.domainEmitter = this;
	      er.domain = domain;
	      er.domainThrown = false;
	      domain.emit('error', er);
	    } else if (er instanceof Error) {
	      throw er; // Unhandled 'error' event
	    } else {
	      // At least give some kind of context to the user
	      var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
	      err.context = er;
	      throw err;
	    }
	    return false;
	  }

	  handler = events[type];

	  if (!handler)
	    return false;

	  var isFn = typeof handler === 'function';
	  len = arguments.length;
	  switch (len) {
	    // fast cases
	    case 1:
	      emitNone(handler, isFn, this);
	      break;
	    case 2:
	      emitOne(handler, isFn, this, arguments[1]);
	      break;
	    case 3:
	      emitTwo(handler, isFn, this, arguments[1], arguments[2]);
	      break;
	    case 4:
	      emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
	      break;
	    // slower
	    default:
	      args = new Array(len - 1);
	      for (i = 1; i < len; i++)
	        args[i - 1] = arguments[i];
	      emitMany(handler, isFn, this, args);
	  }

	  return true;
	};

	function _addListener(target, type, listener, prepend) {
	  var m;
	  var events;
	  var existing;

	  if (typeof listener !== 'function')
	    throw new TypeError('"listener" argument must be a function');

	  events = target._events;
	  if (!events) {
	    events = target._events = new EventHandlers();
	    target._eventsCount = 0;
	  } else {
	    // To avoid recursion in the case that type === "newListener"! Before
	    // adding it to the listeners, first emit "newListener".
	    if (events.newListener) {
	      target.emit('newListener', type,
	                  listener.listener ? listener.listener : listener);

	      // Re-assign `events` because a newListener handler could have caused the
	      // this._events to be assigned to a new object
	      events = target._events;
	    }
	    existing = events[type];
	  }

	  if (!existing) {
	    // Optimize the case of one listener. Don't need the extra array object.
	    existing = events[type] = listener;
	    ++target._eventsCount;
	  } else {
	    if (typeof existing === 'function') {
	      // Adding the second element, need to change to array.
	      existing = events[type] = prepend ? [listener, existing] :
	                                          [existing, listener];
	    } else {
	      // If we've already got an array, just append.
	      if (prepend) {
	        existing.unshift(listener);
	      } else {
	        existing.push(listener);
	      }
	    }

	    // Check for listener leak
	    if (!existing.warned) {
	      m = $getMaxListeners(target);
	      if (m && m > 0 && existing.length > m) {
	        existing.warned = true;
	        var w = new Error('Possible EventEmitter memory leak detected. ' +
	                            existing.length + ' ' + type + ' listeners added. ' +
	                            'Use emitter.setMaxListeners() to increase limit');
	        w.name = 'MaxListenersExceededWarning';
	        w.emitter = target;
	        w.type = type;
	        w.count = existing.length;
	        emitWarning(w);
	      }
	    }
	  }

	  return target;
	}
	function emitWarning(e) {
	  typeof console.warn === 'function' ? console.warn(e) : console.log(e);
	}
	EventEmitter.prototype.addListener = function addListener(type, listener) {
	  return _addListener(this, type, listener, false);
	};

	EventEmitter.prototype.on = EventEmitter.prototype.addListener;

	EventEmitter.prototype.prependListener =
	    function prependListener(type, listener) {
	      return _addListener(this, type, listener, true);
	    };

	function _onceWrap(target, type, listener) {
	  var fired = false;
	  function g() {
	    target.removeListener(type, g);
	    if (!fired) {
	      fired = true;
	      listener.apply(target, arguments);
	    }
	  }
	  g.listener = listener;
	  return g;
	}

	EventEmitter.prototype.once = function once(type, listener) {
	  if (typeof listener !== 'function')
	    throw new TypeError('"listener" argument must be a function');
	  this.on(type, _onceWrap(this, type, listener));
	  return this;
	};

	EventEmitter.prototype.prependOnceListener =
	    function prependOnceListener(type, listener) {
	      if (typeof listener !== 'function')
	        throw new TypeError('"listener" argument must be a function');
	      this.prependListener(type, _onceWrap(this, type, listener));
	      return this;
	    };

	// emits a 'removeListener' event iff the listener was removed
	EventEmitter.prototype.removeListener =
	    function removeListener(type, listener) {
	      var list, events, position, i, originalListener;

	      if (typeof listener !== 'function')
	        throw new TypeError('"listener" argument must be a function');

	      events = this._events;
	      if (!events)
	        return this;

	      list = events[type];
	      if (!list)
	        return this;

	      if (list === listener || (list.listener && list.listener === listener)) {
	        if (--this._eventsCount === 0)
	          this._events = new EventHandlers();
	        else {
	          delete events[type];
	          if (events.removeListener)
	            this.emit('removeListener', type, list.listener || listener);
	        }
	      } else if (typeof list !== 'function') {
	        position = -1;

	        for (i = list.length; i-- > 0;) {
	          if (list[i] === listener ||
	              (list[i].listener && list[i].listener === listener)) {
	            originalListener = list[i].listener;
	            position = i;
	            break;
	          }
	        }

	        if (position < 0)
	          return this;

	        if (list.length === 1) {
	          list[0] = undefined;
	          if (--this._eventsCount === 0) {
	            this._events = new EventHandlers();
	            return this;
	          } else {
	            delete events[type];
	          }
	        } else {
	          spliceOne(list, position);
	        }

	        if (events.removeListener)
	          this.emit('removeListener', type, originalListener || listener);
	      }

	      return this;
	    };

	EventEmitter.prototype.removeAllListeners =
	    function removeAllListeners(type) {
	      var listeners, events;

	      events = this._events;
	      if (!events)
	        return this;

	      // not listening for removeListener, no need to emit
	      if (!events.removeListener) {
	        if (arguments.length === 0) {
	          this._events = new EventHandlers();
	          this._eventsCount = 0;
	        } else if (events[type]) {
	          if (--this._eventsCount === 0)
	            this._events = new EventHandlers();
	          else
	            delete events[type];
	        }
	        return this;
	      }

	      // emit removeListener for all listeners on all events
	      if (arguments.length === 0) {
	        var keys = Object.keys(events);
	        for (var i = 0, key; i < keys.length; ++i) {
	          key = keys[i];
	          if (key === 'removeListener') continue;
	          this.removeAllListeners(key);
	        }
	        this.removeAllListeners('removeListener');
	        this._events = new EventHandlers();
	        this._eventsCount = 0;
	        return this;
	      }

	      listeners = events[type];

	      if (typeof listeners === 'function') {
	        this.removeListener(type, listeners);
	      } else if (listeners) {
	        // LIFO order
	        do {
	          this.removeListener(type, listeners[listeners.length - 1]);
	        } while (listeners[0]);
	      }

	      return this;
	    };

	EventEmitter.prototype.listeners = function listeners(type) {
	  var evlistener;
	  var ret;
	  var events = this._events;

	  if (!events)
	    ret = [];
	  else {
	    evlistener = events[type];
	    if (!evlistener)
	      ret = [];
	    else if (typeof evlistener === 'function')
	      ret = [evlistener.listener || evlistener];
	    else
	      ret = unwrapListeners(evlistener);
	  }

	  return ret;
	};

	EventEmitter.listenerCount = function(emitter, type) {
	  if (typeof emitter.listenerCount === 'function') {
	    return emitter.listenerCount(type);
	  } else {
	    return listenerCount.call(emitter, type);
	  }
	};

	EventEmitter.prototype.listenerCount = listenerCount;
	function listenerCount(type) {
	  var events = this._events;

	  if (events) {
	    var evlistener = events[type];

	    if (typeof evlistener === 'function') {
	      return 1;
	    } else if (evlistener) {
	      return evlistener.length;
	    }
	  }

	  return 0;
	}

	EventEmitter.prototype.eventNames = function eventNames() {
	  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
	};

	// About 1.5x faster than the two-arg version of Array#splice().
	function spliceOne(list, index) {
	  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
	    list[i] = list[k];
	  list.pop();
	}

	function arrayClone(arr, i) {
	  var copy = new Array(i);
	  while (i--)
	    copy[i] = arr[i];
	  return copy;
	}

	function unwrapListeners(arr) {
	  var ret = new Array(arr.length);
	  for (var i = 0; i < ret.length; ++i) {
	    ret[i] = arr[i].listener || arr[i];
	  }
	  return ret;
	}

	var setup = [{
	  name: 'config',
	  payload: {
	    debug: {
	      type: Boolean,
	      default: false
	    },
	    appId: {
	      type: String,
	      required: true
	    },
	    timestamp: Number,
	    nonceStr: String,
	    signature: String
	  },
	  type: 'call'
	}];

	var Keys = {
	  DEBUG: 'DEBUG'
	};

	var Store = /*#__PURE__*/function () {
	  function Store() {
	    _classCallCheck(this, Store);
	  }

	  _createClass(Store, [{
	    key: "set",
	    value: function set(key, value) {
	      if (Keys[key]) {
	        this.key = value;
	      } else {
	        console.error('Env has no key: ', key);
	      }
	    }
	  }, {
	    key: "get",
	    value: function get(key) {
	      return this[key];
	    }
	  }]);

	  return Store;
	}();

	var Env = new Store();

	var currentState = CONFIG_STATE.UNREADY;
	var emitter = new EventEmitter();

	function ready(callback) {
	  if (currentState === CONFIG_STATE.READY) {
	    callback();
	  } else {
	    emitter.on('ready', callback);
	  }
	}

	function error(callback) {
	  emitter.on('error', callback);
	}

	function config(req) {
	  // 重新config
	  if (currentState === CONFIG_STATE.READY) {
	    emitter = new EventEmitter(); // 初始化事件队列

	    currentState = CONFIG_STATE.UNREADY;
	  } // 清除jsBridgeMessageHandlelrs


	  if (window.LanxinJsBridge && window.LanxinJsBridge._reset) {
	    window.LanxinJsBridge._reset();
	  }

	  var configApiMeta = null;
	  setup.forEach(function (apiMeta) {
	    if (apiMeta.name === 'config') configApiMeta = apiMeta;
	  });
	  Env.set(Keys.DEBUG, configApiMeta.debug);

	  req.success = function () {
	    currentState = CONFIG_STATE.READY;
	    console.info('[Lanxin] JsApi Config Success...');
	    if (emitter.listeners('ready').length > 0) emitter.emit('ready');
	  };

	  req.fail = function (res) {
	    currentState = CONFIG_STATE.UNREADY;
	    console.error('[Lanxin] JsApi Config Error...');
	    if (emitter.listeners('error').length > 0) emitter.emit('error', res);
	  };

	  return bridge.proxy(configApiMeta, req);
	}

	var setupApi = {
	  config: config,
	  ready: ready,
	  error: error
	};

	function init() {
	  // if (isPlainObject(window.lx)) {
	  //   throw new Error('Can not init Js SDK twice.');
	  // }
	  bridgeInit();
	  var jsApi = generateApi([].concat(_toConsumableArray(V1ApiList), _toConsumableArray(V2ApiList)));
	  return _objectSpread(_objectSpread(_objectSpread({
	    version: pkg.version
	  }, setupApi), jsApi), {}, {
	    mock: injectMockBridge,
	    platform: platform
	  });
	}

	var lx = init();

	return lx;

})));
